Skip to content

Commit 38a3c19

Browse files
Bordaakihironitta
andauthoredFeb 12, 2025
lint: switch pyupgrade to Ruff's rule UP (#499)
since Ruff is already introduce it would simplify and speed-up linting --------- Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>
1 parent db35443 commit 38a3c19

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed
 

‎.pre-commit-config.yaml

-7
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ repos:
3333
name: Lint yaml
3434
args: [-d, '{extends: default, rules: {line-length: disable, document-start: disable, truthy: {level: error}, braces: {max-spaces-inside: 1}}}']
3535

36-
- repo: https://github.com/asottile/pyupgrade
37-
rev: v3.19.1
38-
hooks:
39-
- id: pyupgrade
40-
name: Upgrade Python syntax
41-
args: [--py39-plus]
42-
4336
- repo: https://github.com/PyCQA/autoflake
4437
rev: v2.3.1
4538
hooks:

‎pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ changelog="https://github.com/pyg-team/pytorch-frame/blob/master/CHANGELOG.md"
6969
name="torch_frame"
7070

7171
[tool.ruff] # https://docs.astral.sh/ruff/rules
72+
target-version = "py39"
7273
select = [
7374
"D", # pydocstyle
75+
"UP", # pyupgrade
7476
]
7577
ignore = [
7678
"D100", # TODO: Don't ignore "Missing docstring in public module"
@@ -84,7 +86,6 @@ ignore = [
8486
src = ["torch_frame"]
8587
line-length = 80
8688
indent-width = 4
87-
target-version = "py39"
8889

8990
# [tool.ruff.per-files-ignores]
9091

0 commit comments

Comments
 (0)