diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6abae50..7f0bd85 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 4d8be1d..1b7813a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/xcompact3d_toolbox/mesh.py b/xcompact3d_toolbox/mesh.py index f5b0761..e69dc4a 100644 --- a/xcompact3d_toolbox/mesh.py +++ b/xcompact3d_toolbox/mesh.py @@ -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") diff --git a/xcompact3d_toolbox/parameters.py b/xcompact3d_toolbox/parameters.py index db13335..d3ff6fd 100644 --- a/xcompact3d_toolbox/parameters.py +++ b/xcompact3d_toolbox/parameters.py @@ -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"