diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5ef619ee9..cf810e2b2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,5 +19,5 @@ repos: name: Run ruff stages: [commit] language: system - entry: ruff + entry: ruff check types: [python] diff --git a/builder2ibek.support.py b/builder2ibek.support.py index e847779b4..bc668d87e 100755 --- a/builder2ibek.support.py +++ b/builder2ibek.support.py @@ -291,7 +291,7 @@ def _make_builder_object(self, name, builder_class): # Classes with a leading underscore are assumed to be private / abstract # builder never exposes them to xeb so we don't want them in the YAML if builder_class.__name__.split(".")[-1].startswith("_"): - print "SKIPPING private class %s" % builder_class.__name__ + print("SKIPPING private class %s" % builder_class.__name__) return None, None arg_info = ArgInfo( @@ -360,8 +360,8 @@ def _extract_substitutions(self, arginfo): # are brought in by instantiating their parent so do not need to # appear in the support yaml print( - "TODO:- No substitutions for %s " % template + - "- this should be included by the above template" + "TODO:- No substitutions for %s " % template + + "- this should be included by the above template" ) if len(databases) > 0: diff --git a/pyproject.toml b/pyproject.toml index 8725da767..8c0f017c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -110,7 +110,7 @@ commands = [tool.ruff] src = ["src", "tests"] -ignore = [ +lint.ignore = [ "C408", # Unnecessary collection call - e.g. list(...) instead of [...] "E501", # Line too long, should be fixed by black. ] @@ -122,7 +122,7 @@ select = [ "W", # pycodestyle warnings - https://beta.ruff.rs/docs/rules/#warning-w "I001", # isort ] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "builder2ibek.support.py" = ["E402"] [tool.setuptools.packages.find]