Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up GitHub Actions #243

Merged
merged 3 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"

- name: Install isort and black
run: pip install isort black
- name: Install black and isort
run: pip install black isort

- name: Run black
run: black . --check --verbose --diff --color --exclude="/*.ipynb/"

- name: Run isort
run: isort . --check --diff --profile black

- name: flake8 Lint
- name: flake8 lint
uses: py-actions/flake8@v2
with:
ignore: "F401"
max-line-length: "88"
plugins: "flake8-bugbear flake8-black"
2 changes: 1 addition & 1 deletion cheetah/converters/bmad.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ def convert_element(
dtype=dtype,
)
else:
raise ValueError(f"Unknown Bmad element type for {name = }")
raise ValueError(f"Unknown Bmad element type for {name = }") # noqa: E202, E251


def convert_bmad_lattice(
Expand Down
2 changes: 1 addition & 1 deletion cheetah/latticejson.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def encode(self, obj, level=0):
if isinstance(obj, dict) and level < 2:
items_indent = (level + 1) * self.indent * " "
items_string = ",\n".join(
f"{items_indent}{json.dumps(key)}: {self.encode(value, level=level+1)}"
f"{items_indent}{json.dumps(key)}: {self.encode(value, level=level + 1)}" # noqa: E501
for key, value in obj.items()
)
dict_indent = level * self.indent * " "
Expand Down