From 872c93a2d9bc94147a741b4f9b187eaa96e5d81b Mon Sep 17 00:00:00 2001 From: harrisonpim Date: Thu, 14 Dec 2023 18:31:02 +0000 Subject: [PATCH] add the 'I' selector to ruff config to sort imports --- .pre-commit-config.yaml | 7 ++++++- pyproject.toml | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0de8e39..668f7b2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: rev: v0.1.6 hooks: - id: ruff - types_or: [ python, jupyter ] + types_or: [ python ] args: [ --fix ] - id: ruff-format types_or: [ python, jupyter ] @@ -22,3 +22,8 @@ repos: files: ^src/ types: [python] additional_dependencies: ['pyright@1.1.294'] + - repo: https://github.com/python-poetry/poetry + rev: '1.7.0' + hooks: + - id: poetry-lock + args: ["--no-update"] diff --git a/pyproject.toml b/pyproject.toml index 5276e0e..f7a39e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,7 @@ target-version = ["py39"] [tool.ruff] select = ["E", "F", "D"] +extend-select = ["I"] # Docstring Ignores: # D100 - Missing docstring in public module # D103 - Missing docstring in public function @@ -52,4 +53,4 @@ line-length = 88 # Ignore `E402` (import violations) in all `__init__.py` files, and in `path/to/file.py`. [tool.ruff.per-file-ignores] "__init__.py" = ["F401"] -"tests/*" = ["E501"] \ No newline at end of file +"tests/*" = ["E501"]