Skip to content

Commit

Permalink
Treat Gaussian log and input files as special cases
Browse files Browse the repository at this point in the history
  • Loading branch information
FanwangM committed Dec 17, 2024
1 parent 65aa595 commit b2fce64
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions iodata/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ def _find_format_modules():
for module_info in iter_modules(import_module("iodata.formats").__path__):
if not module_info.ispkg:
format_module = import_module("iodata.formats." + module_info.name)
# TODO: there should be more robust way to find out the module name

Check notice on line 49 in iodata/api.py

View check run for this annotation

codefactor.io / CodeFactor

iodata/api.py#L49

Unresolved comment '# TODO: there should be more robust way to find out the module name'. (C100)
if hasattr(format_module, "PATTERNS"):
for pattern in format_module.PATTERNS:
result[pattern.replace("*.", "")] = format_module
if module_info.name == "gaussianinput":
result["com"] = format_module
result["gjf"] = format_module
elif module_info.name == "gaussianlog":
result["log"] = format_module
else:
result[module_info.name] = format_module

return result

Expand Down

0 comments on commit b2fce64

Please sign in to comment.