Skip to content

Commit 214f974

Browse files
change apply_macros to print macros to all files, including science (#48)
* change apply_macros to print macros to all files, including science * add fix for 2nd macro in chain * comment fix and change to black filename
1 parent fa14193 commit 214f974

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

lfric_macros/apply_macros.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ def write_new_macro(self, meta_dir, full_command):
745745
" return config, self.reports\n"
746746
)
747747

748-
run_black(filepath)
748+
run_black(temppath)
749749

750750
os.rename(temppath, filepath)
751751

@@ -804,17 +804,7 @@ def preprocess_macros(self):
804804

805805
# Now reconstruct the macro for all applications which have the newly
806806
# added macro or import metadata with the new macro
807-
# Note, this is only done for applications, not for science sections
808807
for meta_dir in self.meta_dirs:
809-
if not (
810-
meta_dir.startswith(
811-
os.path.join(self.root_path, "applications")
812-
)
813-
or meta_dir.startswith(
814-
os.path.join(self.core_source, "applications")
815-
)
816-
):
817-
continue
818808
import_order = self.determine_import_order(meta_dir)
819809
full_command = self.combine_macros(import_order)
820810
# If there are commands to write out, do so and record this

0 commit comments

Comments
 (0)