Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Slightly broaden Ruff, and update and clarify tool configuration#1871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 4 commits intogitpython-developers:mainfromEliahKagan:ruff
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions.pre-commit-config.yaml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
rev: v0.3.2
hooks:
- id: ruff-format
exclude: ^git/ext/
- id: ruff
args: ["--fix"]
exclude: ^doc|^git/ext/
exclude: ^git/ext/

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
rev: v0.9.0.6
hooks:
- id: shellcheck
args: [--color]
exclude: ^test/fixtures/polyglot$|^git/ext/

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-toml
- id: check-yaml
Expand Down
31 changes: 17 additions & 14 deletionspyproject.toml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -48,31 +48,34 @@ line-length = 120
# Exclude a variety of commonly ignored directories.
exclude = [
"git/ext/",
"doc",
"build",
"dist",
]
# Enable Pyflakes `E` and `F` codes by default.
lint.select = [
"E",
"W",# see: https://pypi.org/project/pycodestyle
"F",# see: https://pypi.org/project/pyflakes
# "I",#see: https://pypi.org/project/isort/
# "S",# see: https://pypi.org/project/flake8-bandit
# "UP",# see: https://docs.astral.sh/ruff/rules/#pyupgrade-up
"W", # See: https://pypi.org/project/pycodestyle
"F", # See: https://pypi.org/project/pyflakes
#"I", # See: https://pypi.org/project/isort/
#"S", # See: https://pypi.org/project/flake8-bandit
#"UP", # See: https://docs.astral.sh/ruff/rules/#pyupgrade-up
]
lint.extend-select = [
#"A",# see: https://pypi.org/project/flake8-builtins
"B",# see: https://pypi.org/project/flake8-bugbear
"C4",# see: https://pypi.org/project/flake8-comprehensions
"TCH004",# see: https://docs.astral.sh/ruff/rules/runtime-import-in-type-checking-block/
#"A", # See: https://pypi.org/project/flake8-builtins
"B", # See: https://pypi.org/project/flake8-bugbear
"C4", # See: https://pypi.org/project/flake8-comprehensions
"TCH004", # See: https://docs.astral.sh/ruff/rules/runtime-import-in-type-checking-block/
]
lint.ignore = [
"E203",
"E731", # Do not assign a `lambda` expression, use a `def`
"E203", # Whitespace before ':'
"E731",# Do not assign a `lambda` expression, use a `def`
]
lint.ignore-init-module-imports = true
lint.unfixable = ["F401"]
lint.unfixable = [
"F401", # Module imported but unused
]

[tool.ruff.lint.per-file-ignores]
"test/**" = ["B018"]
"test/**" = [
"B018", # useless-expression
]
5 changes: 3 additions & 2 deletionsrequirements-dev.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
-r requirements.txt
-r test-requirements.txt

# libraries for additional local testing/linting - to be added to test-requirements.txt when all pass

# For additional local testing/linting - to be added elsewhere eventually.
ruff
shellcheck
pytest-icdiff
# pytest-profiling

[8]ページ先頭

©2009-2025 Movatter.jp