diff --git a/poetry.lock b/poetry.lock index a3c5a5b..4f60174 100644 --- a/poetry.lock +++ b/poetry.lock @@ -52,6 +52,21 @@ docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib- tests = ["attrs[tests-no-zope]", "zope.interface"] tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy (>=0.971,<0.990)", "mypy (>=0.971,<0.990)", "pympler", "pympler", "pytest (>=4.3.0)", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-mypy-plugins", "pytest-xdist[psutil]", "pytest-xdist[psutil]"] +[[package]] +name = "autoflake" +version = "2.0.1" +description = "Removes unused imports and unused variables" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "autoflake-2.0.1-py3-none-any.whl", hash = "sha256:143b0843667734af53532c443e950c787316b9b1155b2273558260b44836e8e4"}, + {file = "autoflake-2.0.1.tar.gz", hash = "sha256:1ce520131b7f396915242fe91e57221f4d42408529bbe3ae93adafed286591e0"}, +] + +[package.dependencies] +pyflakes = ">=3.0.0" + [[package]] name = "beautifulsoup4" version = "4.11.2" @@ -515,6 +530,18 @@ files = [ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] +[[package]] +name = "pyflakes" +version = "3.0.1" +description = "passive checker of Python programs" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pyflakes-3.0.1-py2.py3-none-any.whl", hash = "sha256:ec55bf7fe21fff7f1ad2f7da62363d749e2a470500eab1b555334b67aa1ef8cf"}, + {file = "pyflakes-3.0.1.tar.gz", hash = "sha256:ec8b276a6b60bd80defed25add7e439881c19e64850afd9b346283d4165fd0fd"}, +] + [[package]] name = "pyright" version = "1.1.292" @@ -806,4 +833,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "5406c84bd8bd69384b125fbcb104f855df4530427a9568b72f5d623853d5b593" +content-hash = "38adf8f83af28cc5d2fcc4a17dbfed2ec1026d7c297a3af8be350669790635cb" diff --git a/pyproject.toml b/pyproject.toml index 623ed2d..027bf45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,12 +14,7 @@ starlette = "^0.23.1" ulid-py = "^1.1.0" databases = {extras = ["sqlite"], version = "^0.7.0"} uvicorn = "^0.20.0" - -# [tool.poetry.group.fixes.dependencies] -# # `databases` is having issues with new versions of SQLAlchemy 1.4, -# # and `greenlet` is also always a pain. -# SQLAlchemy = "1.4.25" -# greenlet = "1.1.2" +autoflake = "^2.0.1" [tool.poetry.group.dev] optional = true @@ -37,3 +32,13 @@ build-backend = "poetry.core.masonry.api" [tool.pyright] pythonVersion = "3.11" + +[tool.isort] +profile = "black" + +[tool.autoflake] +remove-duplicate-keys = true +remove-unused-variables = true +remove-all-unused-imports = true +ignore-init-module-imports = true +ignore-pass-after-docstring = true diff --git a/scripts/lint-py b/scripts/lint-py index 84a4c65..b2040d7 100755 --- a/scripts/lint-py +++ b/scripts/lint-py @@ -4,6 +4,7 @@ cd "$RUN_DIR" [ -z "${DEBUG:-}" ] || set -x -isort --profile black unwind +autoflake --quiet --check --recursive unwind +isort unwind black unwind pyright