diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 24b8764c064fe8a308b7ca77c99b41f4a4c1a0a3..0000000000000000000000000000000000000000 --- a/.flake8 +++ /dev/null @@ -1,4 +0,0 @@ -[flake8] -ignore = E501, E203, W503 -# E501, E203: black -# W503: PEP8 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ced64ab836e3fcdd684e7a66c415a244cf98f8a1..8ab73ffb7fd848513745bbd5b253cf21b87424c1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,23 +1,19 @@ repos: - - repo: https://github.com/ambv/black - rev: 22.3.0 + - repo: https://github.com/psf/black + rev: 22.8.0 hooks: - id: black - - repo: https://github.com/pycqa/flake8 - rev: 3.9.2 + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.0.238 hooks: - - id: flake8 + - id: ruff + - repo: https://github.com/PyCQA/doc8.git + rev: v1.0.0 # 1.1.0 drops python3.6 support + hooks: + - id: doc8 - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v4.0.1 # 4.2.0 drops python3.6 support hooks: - id: end-of-file-fixer - id: trailing-whitespace - - repo: https://github.com/timothycrosley/isort - rev: 5.10.1 - hooks: - - id: isort - args: ["--profile", "black"] - - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v13.0.0 - hooks: - - id: clang-format + - id: check-yaml diff --git a/require-ess/Db/moduleversion.template b/require-ess/Db/moduleversion.template index f649f5c4e5aad324c021e835554118ebbe113814..6546ab1111428a68ae37f1c721c521d644959420 100644 --- a/require-ess/Db/moduleversion.template +++ b/require-ess/Db/moduleversion.template @@ -50,7 +50,7 @@ record(stringin,"$(REQUIRE_IOC):BaseVersion") } # This record contains labels for the created NTTable, named $(REQUIRE_IOC):LoadedModules. -record(aai, "$(REQUIRE_IOC):Labels") +record(aai, "$(REQUIRE_IOC):Labels") { field(DESC, "Labels for the NTTable") field(FTVL, "STRING") diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 0000000000000000000000000000000000000000..d8c478b970a4ff1a2c480fa416b5da636820329d --- /dev/null +++ b/ruff.toml @@ -0,0 +1,2 @@ +extend-select = ["D212"] +extend-ignore = ["D105", "D107", "D202", "D418", "E501"] diff --git a/tests/utils.py b/tests/utils.py index 312f9c32a4b9589af446b52b94b28b45441aa70d..b837ab55ce5e1c06586e80104b1eae00bdca0759 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -153,9 +153,7 @@ EXCLUDE_ARCHS+=debug def run_ioc_get_output(*args, **kwargs): - """ - Run an IOC and try to load the test module - """ + """Run an IOC and try to load the test module.""" ioc_args = [] module = kwargs.get("module", None) version = kwargs.get("version", None)