Skip to content

Commit

Permalink
remove processing of docstrings (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
james-bruten-mo authored Dec 17, 2024
1 parent 082eb7f commit 5c5e5ff
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions lfric_macros/apply_macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,9 @@ def split_macros(parsed_versions):
in_macro = False
in_comment = False
for line in parsed_versions:
if '"""' in line:
# If there is a comment marker in the line, check there aren't 2
for _ in range(line.count('"""')):
in_comment = not in_comment
if in_comment:
continue
if line.startswith("class vn"):
if line.startswith("class vn") and not line.startswith(
"class vnXX_txxx"
):
# If the macro string is set, then append to the list. If it's
# empty then this is the first macro we're looking at, so nothing to
# append
Expand Down Expand Up @@ -249,9 +245,7 @@ def set_rose_meta_path(self):
When Jules Shared from Jules is enabled, self.jules_source will need
adding here
"""
rose_meta_path = (
f"{self.root_path}:{self.core_source}"
)
rose_meta_path = f"{self.root_path}:{self.core_source}"
os.environ["ROSE_META_PATH"] = rose_meta_path

def parse_application_section(self, meta_dir):
Expand Down Expand Up @@ -441,7 +435,7 @@ def parse_macro(self, macro, meta_dir):
in_function = True
continue
if (
line_stripped.startswith("return")
line_stripped.startswith("return config, self.reports")
or line_stripped.startswith("# Input your macro commands here")
or line_stripped.lower().startswith("# add settings")
or not in_function
Expand Down

0 comments on commit 5c5e5ff

Please sign in to comment.