Skip to content

Commit 5c5e5ff

Browse files
remove processing of docstrings (#45)
1 parent 082eb7f commit 5c5e5ff

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

lfric_macros/apply_macros.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,9 @@ def split_macros(parsed_versions):
125125
in_macro = False
126126
in_comment = False
127127
for line in parsed_versions:
128-
if '"""' in line:
129-
# If there is a comment marker in the line, check there aren't 2
130-
for _ in range(line.count('"""')):
131-
in_comment = not in_comment
132-
if in_comment:
133-
continue
134-
if line.startswith("class vn"):
128+
if line.startswith("class vn") and not line.startswith(
129+
"class vnXX_txxx"
130+
):
135131
# If the macro string is set, then append to the list. If it's
136132
# empty then this is the first macro we're looking at, so nothing to
137133
# append
@@ -249,9 +245,7 @@ def set_rose_meta_path(self):
249245
When Jules Shared from Jules is enabled, self.jules_source will need
250246
adding here
251247
"""
252-
rose_meta_path = (
253-
f"{self.root_path}:{self.core_source}"
254-
)
248+
rose_meta_path = f"{self.root_path}:{self.core_source}"
255249
os.environ["ROSE_META_PATH"] = rose_meta_path
256250

257251
def parse_application_section(self, meta_dir):
@@ -441,7 +435,7 @@ def parse_macro(self, macro, meta_dir):
441435
in_function = True
442436
continue
443437
if (
444-
line_stripped.startswith("return")
438+
line_stripped.startswith("return config, self.reports")
445439
or line_stripped.startswith("# Input your macro commands here")
446440
or line_stripped.lower().startswith("# add settings")
447441
or not in_function

0 commit comments

Comments
 (0)