Skip to content

Commit 211b4c0

Browse files
pre-commit autoupgrade
1 parent f63efa8 commit 211b4c0

3 files changed

Lines changed: 42 additions & 54 deletions

File tree

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
repos:
22
- repo: https://github.com/asottile/pyupgrade
3-
rev: v3.3.1
3+
rev: v3.20.0
44
hooks:
55
- id: pyupgrade
66
args: [--py38-plus]
77
- repo: https://github.com/tox-dev/pyproject-fmt
8-
rev: "0.4.1"
8+
rev: "v2.6.0"
99
hooks:
1010
- id: pyproject-fmt
1111

1212
- repo: https://github.com/psf/black
13-
rev: 22.12.0
13+
rev: 25.1.0
1414
hooks:
1515
- id: black
1616
language_version: python3
1717
- repo: https://github.com/pre-commit/mirrors-mypy
18-
rev: 'v0.991'
18+
rev: 'v1.17.0'
1919
hooks:
2020
- id: mypy
2121
args: []

pyproject.toml

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,33 @@ description = "brain-dead simple config-ini parsing"
1111
readme = "README.rst"
1212
license = "MIT"
1313
authors = [
14-
{ name = "Ronny Pfannschmidt", email = "opensource@ronnypfannschmidt.de" },
15-
{ name = "Holger Krekel", email = "holger.krekel@gmail.com" },
14+
{ name = "Ronny Pfannschmidt", email = "opensource@ronnypfannschmidt.de" },
15+
{ name = "Holger Krekel", email = "holger.krekel@gmail.com" },
1616
]
1717
requires-python = ">=3.8"
18+
classifiers = [
19+
"Development Status :: 4 - Beta",
20+
"Intended Audience :: Developers",
21+
"License :: OSI Approved :: MIT License",
22+
"Operating System :: MacOS :: MacOS X",
23+
"Operating System :: Microsoft :: Windows",
24+
"Operating System :: POSIX",
25+
"Programming Language :: Python :: 3 :: Only",
26+
"Programming Language :: Python :: 3.8",
27+
"Programming Language :: Python :: 3.9",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
30+
"Programming Language :: Python :: 3.12",
31+
"Programming Language :: Python :: 3.13",
32+
"Topic :: Software Development :: Libraries",
33+
"Topic :: Utilities",
34+
]
1835
dynamic = [
1936
"version",
2037
]
21-
classifiers = [
22-
"Development Status :: 4 - Beta",
23-
"Intended Audience :: Developers",
24-
"License :: OSI Approved :: MIT License",
25-
"Operating System :: MacOS :: MacOS X",
26-
"Operating System :: Microsoft :: Windows",
27-
"Operating System :: POSIX",
28-
"Programming Language :: Python :: 3",
29-
"Programming Language :: Python :: 3 :: Only",
30-
"Programming Language :: Python :: 3.8",
31-
"Programming Language :: Python :: 3.9",
32-
"Programming Language :: Python :: 3.10",
33-
"Programming Language :: Python :: 3.11",
34-
"Programming Language :: Python :: 3.12",
35-
"Programming Language :: Python :: 3.13",
36-
"Topic :: Software Development :: Libraries",
37-
"Topic :: Utilities",
38-
]
39-
[project.urls]
40-
Homepage = "https://github.com/pytest-dev/iniconfig"
38+
urls.Homepage = "https://github.com/pytest-dev/iniconfig"
39+
40+
[tool.setuptools_scm]
4141

4242
[tool.hatch.version]
4343
source = "vcs"
@@ -47,24 +47,22 @@ version-file = "src/iniconfig/_version.py"
4747

4848
[tool.hatch.build.targets.sdist]
4949
include = [
50-
"/src",
51-
"/testing",
50+
"/src",
51+
"/testing",
5252
]
5353

5454
[tool.hatch.envs.test]
5555
dependencies = [
56-
"pytest"
56+
"pytest",
5757
]
5858
[tool.hatch.envs.test.scripts]
5959
default = "pytest {args}"
6060

6161
[[tool.hatch.envs.test.matrix]]
62-
python = ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
62+
python = [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
6363

64-
[tool.setuptools_scm]
64+
[tool.pytest.ini_options]
65+
testpaths = "testing"
6566

6667
[tool.mypy]
6768
strict = true
68-
69-
[tool.pytest.ini_options]
70-
testpaths = "testing"

src/iniconfig/__init__.py

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,38 +39,33 @@ def lineof(self, name: str) -> int | None:
3939
return self.config.lineof(self.name, name)
4040

4141
@overload
42-
def get(self, key: str) -> str | None:
43-
...
42+
def get(self, key: str) -> str | None: ...
4443

4544
@overload
4645
def get(
4746
self,
4847
key: str,
4948
convert: Callable[[str], _T],
50-
) -> _T | None:
51-
...
49+
) -> _T | None: ...
5250

5351
@overload
5452
def get(
5553
self,
5654
key: str,
5755
default: None,
5856
convert: Callable[[str], _T],
59-
) -> _T | None:
60-
...
57+
) -> _T | None: ...
6158

6259
@overload
63-
def get(self, key: str, default: _D, convert: None = None) -> str | _D:
64-
...
60+
def get(self, key: str, default: _D, convert: None = None) -> str | _D: ...
6561

6662
@overload
6763
def get(
6864
self,
6965
key: str,
7066
default: _D,
7167
convert: Callable[[str], _T],
72-
) -> _T | _D:
73-
...
68+
) -> _T | _D: ...
7469

7570
# TODO: investigate possible mypy bug wrt matching the passed over data
7671
def get( # type: ignore [misc]
@@ -143,17 +138,15 @@ def get(
143138
self,
144139
section: str,
145140
name: str,
146-
) -> str | None:
147-
...
141+
) -> str | None: ...
148142

149143
@overload
150144
def get(
151145
self,
152146
section: str,
153147
name: str,
154148
convert: Callable[[str], _T],
155-
) -> _T | None:
156-
...
149+
) -> _T | None: ...
157150

158151
@overload
159152
def get(
@@ -162,14 +155,12 @@ def get(
162155
name: str,
163156
default: None,
164157
convert: Callable[[str], _T],
165-
) -> _T | None:
166-
...
158+
) -> _T | None: ...
167159

168160
@overload
169161
def get(
170162
self, section: str, name: str, default: _D, convert: None = None
171-
) -> str | _D:
172-
...
163+
) -> str | _D: ...
173164

174165
@overload
175166
def get(
@@ -178,8 +169,7 @@ def get(
178169
name: str,
179170
default: _D,
180171
convert: Callable[[str], _T],
181-
) -> _T | _D:
182-
...
172+
) -> _T | _D: ...
183173

184174
def get( # type: ignore
185175
self,

0 commit comments

Comments
 (0)