diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 41ee828436..3a90ca97a5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,13 +15,25 @@ repos: name: pip-compile-dev args: [--extra=dev, --output-file=requirements-dev.txt] files: ^pyproject.toml$ - - repo: https://github.com/hhatto/autopep8 - rev: v2.0.4 + - repo: https://github.com/psf/black + rev: 23.12.0 hooks: - - id: autopep8 - name: autopep8 + - id: black + name: black - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort name: isort (python) + - repo: local + hooks: + - id: pylint + name: pylint + entry: pylint + language: system + types: [python] + args: + [ + "-rn", # Only display messages + "-sn", # Don't display the score + ] diff --git a/pyproject.toml b/pyproject.toml index cd380f51e6..8165c57617 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,8 +28,10 @@ dev = [ "pre-commit~=3.6.0", "ansible-core~=2.16.2", "isort", - "autopep8", "mypy", + "black", + "pylint", + "jsonref", ] [build-system] @@ -39,10 +41,9 @@ build-backend = "setuptools.build_meta" [tool.setuptools.packages.find] where = ["acto"] -[tool.autopep8] -max_line_length = 80 -aggressive = 3 -experimental = true +[tool.black] +line-length = 80 +target-version = ["py310", "py311"] [tool.isort] profile = "black" diff --git a/requirements-dev.txt b/requirements-dev.txt index 2e122afba5..42ab49808f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,13 +4,23 @@ # # pip-compile --extra=dev --output-file=requirements-dev.txt # +aiohttp==3.9.1 + # via black +aiosignal==1.3.1 + # via aiohttp annotated-types==0.6.0 # via pydantic ansible-core==2.16.2 # via acto (pyproject.toml) +astroid==3.0.2 + # via pylint +async-timeout==4.0.3 + # via aiohttp attrs==23.1.0 - # via jsonschema -autopep8==2.0.4 + # via + # aiohttp + # jsonschema +black==23.12.0 # via acto (pyproject.toml) build==1.0.3 # via pip-tools @@ -27,7 +37,9 @@ cfgv==3.4.0 charset-normalizer==3.3.2 # via requests click==8.1.7 - # via pip-tools + # via + # black + # pip-tools coverage[toml]==7.3.3 # via # coverage @@ -36,6 +48,8 @@ cryptography==41.0.7 # via ansible-core deepdiff==6.3.1 # via acto (pyproject.toml) +dill==0.3.7 + # via pylint distlib==0.3.8 # via virtualenv docker==6.1.3 @@ -46,32 +60,50 @@ exrex==0.11.0 # via acto (pyproject.toml) filelock==3.13.1 # via virtualenv +frozenlist==1.4.1 + # via + # aiohttp + # aiosignal google-auth==2.25.2 # via kubernetes identify==2.5.33 # via pre-commit idna==3.6 - # via requests + # via + # requests + # yarl iniconfig==2.0.0 # via pytest isort==5.13.2 - # via acto (pyproject.toml) + # via + # acto (pyproject.toml) + # pylint jinja2==3.1.2 # via ansible-core jsonpatch==1.33 # via acto (pyproject.toml) jsonpointer==2.4 # via jsonpatch +jsonref==1.1.0 + # via acto (pyproject.toml) jsonschema==4.17.3 # via acto (pyproject.toml) kubernetes==26.1.0 # via acto (pyproject.toml) markupsafe==2.1.3 # via jinja2 +mccabe==0.7.0 + # via pylint +multidict==6.0.4 + # via + # aiohttp + # yarl mypy==1.7.1 # via acto (pyproject.toml) mypy-extensions==1.0.0 - # via mypy + # via + # black + # mypy nodeenv==1.8.0 # via pre-commit numpy==1.26.2 @@ -83,15 +115,21 @@ ordered-set==4.1.0 packaging==23.2 # via # ansible-core + # black # build # docker # pytest pandas==2.0.3 # via acto (pyproject.toml) +pathspec==0.12.1 + # via black pip-tools==7.3.0 # via acto (pyproject.toml) platformdirs==4.1.0 - # via virtualenv + # via + # black + # pylint + # virtualenv pluggy==1.3.0 # via pytest pre-commit==3.6.0 @@ -104,14 +142,14 @@ pyasn1==0.5.1 # rsa pyasn1-modules==0.3.0 # via google-auth -pycodestyle==2.11.1 - # via autopep8 pycparser==2.21 # via cffi pydantic==2.5.2 # via acto (pyproject.toml) pydantic-core==2.14.5 # via pydantic +pylint==3.0.3 + # via acto (pyproject.toml) pyproject-hooks==1.0.0 # via build pyrsistent==0.20.0 @@ -154,15 +192,20 @@ tabulate==0.9.0 # via acto (pyproject.toml) tomli==2.0.1 # via - # autopep8 + # black # build # coverage # mypy # pip-tools + # pylint # pyproject-hooks # pytest +tomlkit==0.12.3 + # via pylint typing-extensions==4.9.0 # via + # astroid + # black # mypy # pydantic # pydantic-core @@ -181,6 +224,8 @@ websocket-client==1.7.0 # kubernetes wheel==0.42.0 # via pip-tools +yarl==1.9.4 + # via aiohttp # The following packages are considered to be unsafe in a requirements file: # pip