Skip to content

Commit e5cb644

Browse files
authored
Remove pyupgrade and flynt pre-commit hooks (#203)
Use the corresponding ruff rules instead
1 parent 7b7b593 commit e5cb644

5 files changed

Lines changed: 11 additions & 26 deletions

File tree

.pre-commit-config.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ repos:
2424
# Check and update the uv lockfile
2525
- id: uv-lock
2626

27-
- repo: https://github.com/ikamensh/flynt/
28-
rev: '1.0.1'
29-
hooks:
30-
- id: flynt
31-
3227
- repo: https://github.com/executablebooks/mdformat
3328
rev: '0.7.17'
3429
hooks:
@@ -39,12 +34,6 @@ repos:
3934
- mdformat-black
4035
files: (?x)^(README\.md|CHANGELOG\.md)$
4136

42-
- repo: https://github.com/asottile/pyupgrade
43-
rev: v3.14.0
44-
hooks:
45-
- id: pyupgrade
46-
args: [--py37-plus]
47-
4837
- repo: https://github.com/astral-sh/ruff-pre-commit
4938
rev: v0.8.6
5039
hooks:

disk_objectstore/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import os
77
import sys
88
from pathlib import Path
9-
from typing import List, Optional
9+
from typing import Optional
1010

1111
import click
1212

@@ -142,7 +142,7 @@ def callback(self, action, value):
142142
@main.command('add-files')
143143
@click.argument('files', nargs=-1, type=click.Path(exists=True))
144144
@pass_dostore
145-
def add_files(dostore: ContainerContext, files: List[str]):
145+
def add_files(dostore: ContainerContext, files: list[str]):
146146
"""Add file(s) to the container"""
147147
with dostore.container as container:
148148
click.echo(f'Adding {len(files)} file(s) to container: {container.get_folder()}')

disk_objectstore/dataclasses.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55

66
from dataclasses import asdict, dataclass
7-
from typing import TYPE_CHECKING, List, Optional, Union
7+
from typing import TYPE_CHECKING, Optional, Union
88

99
if TYPE_CHECKING:
1010
from .container import ObjectType
@@ -113,10 +113,10 @@ class ValidationIssues:
113113
have some overlap
114114
"""
115115

116-
invalid_hashes_loose: List[str]
117-
invalid_hashes_packed: List[str]
118-
invalid_sizes_packed: List[str]
119-
overlapping_packed: List[str]
116+
invalid_hashes_loose: list[str]
117+
invalid_hashes_packed: list[str]
118+
invalid_sizes_packed: list[str]
119+
overlapping_packed: list[str]
120120

121121
def __getitem__(self, item: str) -> Union[str, int, bool, None]:
122122
"""Return members using dictionary access.

disk_objectstore/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import os
1414
import uuid
1515
import zlib
16+
from collections.abc import Iterable, Iterator, Sequence
1617
from contextlib import contextmanager
1718
from enum import Enum
1819
from pathlib import Path
@@ -21,10 +22,7 @@
2122
Any,
2223
BinaryIO,
2324
Callable,
24-
Iterable,
25-
Iterator,
2625
Literal,
27-
Sequence,
2826
Union,
2927
)
3028
from zlib import error

pyproject.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ exclude = [
9595
'tests/',
9696
]
9797

98-
[tool.flynt]
99-
line-length = 120
100-
fail-on-change = true
101-
10298
[tool.ruff]
10399
line-length = 120
104100

@@ -134,7 +130,9 @@ select = [
134130
'PLE', # pylint-error
135131
'PLR', # pylint-refactor
136132
'PLW', # pylint-warning
137-
'RUF' # ruff
133+
'RUF', # ruff
134+
'FLY', # flynt (f-string formatting)
135+
'UP' # pyupgrade
138136
]
139137

140138
[tool.mypy]

0 commit comments

Comments
 (0)