Skip to content

Commit b6ec2cd

Browse files
authored
Set target version for ruff. (#334)
1 parent f0ad77c commit b6ec2cd

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ repos:
3131
hooks:
3232
- id: reorder-python-imports
3333
args: [--py37-plus, --add-import, 'from __future__ import annotations']
34-
- repo: https://github.com/asottile/pyupgrade
35-
rev: v3.3.1
36-
hooks:
37-
- id: pyupgrade
38-
args: [--py37-plus]
3934
- repo: https://github.com/asottile/setup-cfg-fmt
4035
rev: v2.2.0
4136
hooks:

docs/source/changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and
1313
- {pull}`330` add a guide for migrating from scripts to pytask.
1414
- {pull}`332` refactors `database.py`.
1515
- {pull}`333` requires attrs v21.3.0 and updates the code accordingly.
16+
- {pull}`334` adds `target-version` to ruff config.
1617

1718
## 0.2.7 - 2022-12-14
1819

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ ignore-words-list = "falsy, hist, ines, unparseable"
2929

3030

3131
[tool.ruff]
32+
target-version = "py37"
3233
select = ["ALL"]
3334
fix = true
3435
extend-ignore = [
@@ -38,12 +39,12 @@ extend-ignore = [
3839
"D212",
3940
"D213",
4041
"D402",
41-
"D404",
4242
"D413",
4343
"D415",
4444
"D416",
4545
"D417",
4646
# Others.
47+
"D404", # Do not start module docstring with "This".
4748
"RET504", # unnecessary variable assignment before return.
4849
"S101", # raise errors for asserts.
4950
"B905", # strict parameter for zip that was implemented in py310.
@@ -54,7 +55,6 @@ extend-ignore = [
5455
"EM", # flake8-errmsg
5556
"ANN401", # flake8-annotate typing.Any
5657
"PD", # pandas-vet
57-
"UP", # pyupgrade is too aggressive for py<3.10
5858
]
5959

6060

@@ -65,3 +65,7 @@ extend-ignore = [
6565
"tests/test_capture.py" = ["T201"]
6666
"tests/*" = ["D", "ANN"]
6767
"scripts/*" = ["D"]
68+
69+
70+
[tool.ruff.pydocstyle]
71+
convention = "numpy"

0 commit comments

Comments
 (0)