Skip to content

Commit

Permalink
add the 'I' selector to ruff config to sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
harrisonpim committed Dec 14, 2023
1 parent 9b2e07f commit 872c93a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand All @@ -22,3 +22,8 @@ repos:
files: ^src/
types: [python]
additional_dependencies: ['[email protected]']
- repo: https://github.com/python-poetry/poetry
rev: '1.7.0'
hooks:
- id: poetry-lock
args: ["--no-update"]
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
"tests/*" = ["E501"]

0 comments on commit 872c93a

Please sign in to comment.