Skip to content

Commit

Permalink
Merge pull request #9 from pyiron/add_black
Browse files Browse the repository at this point in the history
Add black
  • Loading branch information
samwaseda authored Oct 5, 2024
2 parents f6ad48b + a6d8534 commit 48022a0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dependencies:
- coveralls
- coverage
- numpy =1.26.0
- black =24.8.0
1 change: 1 addition & 0 deletions .ci_support/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dependencies:
- coveralls
- coverage
- numpy =1.26.0
- black =24.8.0
1 change: 1 addition & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ dependencies:
- coveralls
- coverage
- numpy =1.26.0
- black =24.8.0
2 changes: 2 additions & 0 deletions stinx/src/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import numpy as np
import yaml
import os
from black import format_str, FileMode


indent = 4 * " "
Expand Down Expand Up @@ -203,6 +204,7 @@ def export_class(yml_file_name="input_data.yml", py_file_name="input.py"):
"from stinx.toolkit import fill_values",
]
file_content = "\n".join(imports) + "\n\n\n" + file_content
file_content = format_str(file_content, mode=FileMode())
with open(
os.path.join(os.path.dirname(__file__), "..", py_file_name), "w"
) as f:
Expand Down

0 comments on commit 48022a0

Please sign in to comment.