Skip to content

Commit 7225533

Browse files
fix ruff config
1 parent 8cf87be commit 7225533

38 files changed

+102
-58
lines changed

_own_version_helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
from __future__ import annotations
1010

1111
import logging
12+
1213
from typing import Callable
1314

14-
from setuptools import build_meta as build_meta # noqa
15+
from setuptools import build_meta as build_meta
1516
from setuptools_scm import Configuration
1617
from setuptools_scm import _types as _t
1718
from setuptools_scm import get_version

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,12 @@ version = { attr = "_own_version_helper.version"}
115115
[tool.ruff]
116116
required-version = "0.2.1"
117117
fix = true
118-
lint.select = ["E", "F", "B", "U", "YTT", "C", "DTZ", "PYI", "PT", "I"]
118+
lint.select = ["E", "F", "B", "U", "YTT", "C", "DTZ", "PYI", "PT", "I", "FURB", "RUF"]
119119
lint.ignore = ["B028"]
120-
120+
lint.preview = true
121121

122122
[tool.ruff.lint.isort]
123123
force-single-line = true
124-
force-sort-within-sections = true
125124
from-first = false
126125
lines-between-types = 1
127126
order-by-type = true

src/setuptools_scm/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
# Public API
1919
__all__ = [
20-
# soft deprecated imports, left for backward compatibility
21-
"get_version",
22-
"_get_version",
23-
"dump_version",
24-
"DEFAULT_VERSION_SCHEME",
2520
"DEFAULT_LOCAL_SCHEME",
21+
"DEFAULT_VERSION_SCHEME",
2622
"Configuration",
27-
"Version",
28-
"ScmVersion",
2923
"NonNormalizedVersion",
24+
"ScmVersion",
25+
"Version",
26+
"_get_version",
27+
"dump_version",
28+
# soft deprecated imports, left for backward compatibility
29+
"get_version",
3030
]

src/setuptools_scm/_config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44

55
import dataclasses
66
import os
7-
from pathlib import Path
87
import re
8+
import warnings
9+
10+
from pathlib import Path
911
from typing import Any
1012
from typing import Pattern
1113
from typing import Protocol
12-
import warnings
1314

1415
from . import _log
1516
from . import _types as _t

src/setuptools_scm/_entrypoints.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import sys
4+
45
from typing import TYPE_CHECKING
56
from typing import Any
67
from typing import Callable

src/setuptools_scm/_file_finders/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import itertools
44
import os
5+
56
from typing import TYPE_CHECKING
67
from typing import Callable
78

src/setuptools_scm/_file_finders/git.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55
import subprocess
66
import tarfile
7+
78
from typing import IO
89

910
from .. import _types as _t

src/setuptools_scm/_get_version_impl.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
from __future__ import annotations
22

33
import logging
4-
from pathlib import Path
54
import re
5+
import warnings
6+
7+
from pathlib import Path
68
from typing import Any
79
from typing import NoReturn
810
from typing import Pattern
9-
import warnings
1011

1112
from . import _config
1213
from . import _entrypoints

src/setuptools_scm/_integration/dump_version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from __future__ import annotations
22

3-
from pathlib import Path
43
import warnings
54

5+
from pathlib import Path
6+
67
from .. import _types as _t
78
from .._log import log as parent_log
89
from .._version_cls import _version_as_tuple

src/setuptools_scm/_integration/pyproject_reading.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from __future__ import annotations
22

3+
import warnings
4+
35
from pathlib import Path
46
from typing import NamedTuple
5-
import warnings
67

78
from .. import _log
89
from .setuptools import read_dist_name_from_setup_cfg

0 commit comments

Comments
 (0)