Skip to content

Commit

Permalink
Update test dependencies (#11361)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored Feb 5, 2024
1 parent c49c84f commit bf58d62
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
version: "0.1.11" # must match .pre-commit-config.yaml and requirements-test.txt
version: "0.2.0" # must match .pre-commit-config.yaml and requirements-test.txt

flake8:
name: Lint with Flake8
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ repos:
- id: black
language_version: python3.10
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.11 # must match requirements-tests.txt and tests.yml
rev: v0.2.0 # must match requirements-tests.txt and tests.yml
hooks:
- id: ruff
args: [--exit-non-zero-on-fix, --fix-only]
- repo: https://github.com/pycqa/flake8
rev: 6.1.0 # must match requirements-tests.txt
rev: 7.0.0 # must match requirements-tests.txt
hooks:
- id: flake8
additional_dependencies:
- "flake8-bugbear==23.12.2" # must match requirements-tests.txt
- "flake8-noqa==1.3.2" # must match requirements-tests.txt
- "flake8-bugbear==24.1.17" # must match requirements-tests.txt
- "flake8-noqa==1.4.0" # must match requirements-tests.txt
- "flake8-pyi==24.1.0" # must match requirements-tests.txt
types: [file]
types_or: [python, pyi]
Expand Down
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ force-exclude = ".*_pb2.pyi"
[tool.ruff]
line-length = 130
# Oldest supported Python version
target-version = "py37"
target-version = "py38"
fix = true
exclude = [
# virtual environment
Expand All @@ -22,6 +22,8 @@ exclude = [
".mypy_cache",
".pytype",
]

[tool.ruff.lint]
select = [
"FA", # flake8-future-annotations
"I", # isort
Expand All @@ -31,9 +33,12 @@ select = [
"PYI010", # function bodies must be empty
"PYI012", # class bodies must not contain `pass`
"PYI013", # non-empty class bodies must not contain `...`
"PYI016", # duplicate union member
"PYI020", # quoted annotations are always unnecessary in stubs
"PYI025", # always alias `collections.abc.Set` as `AbstractSet` when importing it
"PYI032", # use `object`, not `Any`, as the second parameter to `__eq__`
"PYI055", # multiple `type[T]` usages in a union
"PYI058", # use `Iterator` as the return type for `__iter__` methods
"UP004", # Remove explicit `object` inheritance
"UP006", # PEP-585 autofixes
"UP007", # PEP-604 autofixes
Expand All @@ -44,7 +49,7 @@ select = [
"UP039", # don't use parens after a class definition with no bases
]

[tool.ruff.isort]
[tool.ruff.lint.isort]
split-on-trailing-comma = false
combine-as-imports = true
extra-standard-library = [
Expand Down
12 changes: 6 additions & 6 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
# be pinned to a specific version to make failure reproducible. See also the
# "tool.typeshed" section in pyproject.toml for additional type checkers.
black==24.1.1 # must match .pre-commit-config.yaml
flake8==6.1.0 # must match .pre-commit-config.yaml
flake8-bugbear==23.12.2 # must match .pre-commit-config.yaml
flake8-noqa==1.3.2 # must match .pre-commit-config.yaml
flake8==7.0.0 # must match .pre-commit-config.yaml
flake8-bugbear==24.1.17 # must match .pre-commit-config.yaml
flake8-noqa==1.4.0 # must match .pre-commit-config.yaml
flake8-pyi==24.1.0 # must match .pre-commit-config.yaml
mypy==1.8.0
pre-commit-hooks==4.5.0 # must match .pre-commit-config.yaml
pytype==2023.12.18; platform_system != "Windows" and python_version < "3.12"
ruff==0.1.11 # must match .pre-commit-config.yaml and tests.yml
pytype==2024.1.24; platform_system != "Windows" and python_version < "3.12"
ruff==0.2.0 # must match .pre-commit-config.yaml and tests.yml

# Libraries used by our various scripts.
aiohttp==3.9.2
aiohttp==3.9.3
packaging==23.2
pathspec>=0.11.1
pyyaml==6.0.1
Expand Down

0 comments on commit bf58d62

Please sign in to comment.