Skip to content

Commit

Permalink
pre-commit autoupdate (#77)
Browse files Browse the repository at this point in the history
* pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.4 → v0.9.3](astral-sh/ruff-pre-commit@v0.8.4...v0.9.3)
- [github.com/pre-commit/mirrors-mypy: v1.14.0 → v1.14.1](pre-commit/mirrors-mypy@v1.14.0...v1.14.1)
- [github.com/codespell-project/codespell: v2.3.0 → v2.4.0](codespell-project/codespell@v2.3.0...v2.4.0)

* Auto format from pre-commit.com hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Jan 30, 2025
1 parent 830b6ac commit a5da815
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
rev: v0.9.3
hooks:
# Run the linter.
- id: ruff
Expand All @@ -27,13 +27,13 @@ repos:
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.14.0"
rev: "v1.14.1"
hooks:
- id: mypy
exclude: docs/conf.py
additional_dependencies: ["types-Deprecated"]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.0
hooks:
- id: codespell
additional_dependencies:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ exclude = ["docs/conf.py"]
[tool.codespell]
skip = "docs/conf.py"
check-filenames = true
ignore-words-list = ["ABL"]

[tool.hatch.version]
source = "vcs"
Expand Down
2 changes: 1 addition & 1 deletion xcompact3d_toolbox/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def set(self, **kwargs) -> None:
@traitlets.validate("grid_size")
def _validate_grid_size(self, proposal):
if not _validate_grid_size(proposal.get("value"), self.is_periodic):
msg = f'{proposal.get("value")} is an invalid value for grid size'
msg = f"{proposal.get('value')} is an invalid value for grid size"
raise traitlets.TraitError(msg)
return proposal.get("value")

Expand Down
8 changes: 4 additions & 4 deletions xcompact3d_toolbox/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -983,16 +983,16 @@ def __str__(self):
# Check if param is a list or not
if isinstance(paramvalue, list):
for n, p in enumerate(paramvalue):
string += f"{paramkey+'('+str(n+1)+')':>15} = {p:<15} {'! '+description}\n"
string += f"{paramkey + '(' + str(n + 1) + ')':>15} = {p:<15} {'! ' + description}\n"
# Check if param is a string
elif isinstance(paramvalue, str):
new_paramvalue = "'" + paramvalue + "'"
string += f"{paramkey:>15} = {new_paramvalue:<15} {'! '+description}\n"
string += f"{paramkey:>15} = {new_paramvalue:<15} {'! ' + description}\n"
elif isinstance(paramvalue, bool):
new_paramvalue = ".true." if paramvalue else ".false."
string += f"{paramkey:>15} = {new_paramvalue:<15} {'! '+description}\n"
string += f"{paramkey:>15} = {new_paramvalue:<15} {'! ' + description}\n"
else:
string += f"{paramkey:>15} = {paramvalue:<15} {'! '+description}\n"
string += f"{paramkey:>15} = {paramvalue:<15} {'! ' + description}\n"
string += "\n"
string += "/End\n"

Expand Down

0 comments on commit a5da815

Please sign in to comment.