Skip to content

Commit b8ff125

Browse files
[pre-commit.ci] pre-commit autoupdate (#697)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tobias Raabe <raabe@posteo.de>
1 parent 83595aa commit b8ff125

11 files changed

Lines changed: 19 additions & 20 deletions

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-added-large-files
66
args: ['--maxkb=25']
@@ -25,7 +25,7 @@ repos:
2525
- id: python-no-log-warn
2626
- id: text-unicode-replacement-char
2727
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: v0.12.4
28+
rev: v0.13.2
2929
hooks:
3030
- id: ruff-format
3131
- id: ruff-check
@@ -55,7 +55,7 @@ repos:
5555
- id: nbstripout
5656
exclude: (docs)
5757
- repo: https://github.com/crate-ci/typos
58-
rev: v1.34.0
58+
rev: v1
5959
hooks:
6060
- id: typos
6161
exclude: (\.ipynb)

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ ignore = [
122122
"COM812", # Comply with ruff-format.
123123
"ISC001", # Comply with ruff-format.
124124
"FBT",
125-
"PD901", # Avoid generic df for dataframes.
126125
"S101", # raise errors for asserts.
127126
"S603", # Call check with subprocess.run.
128127
"S607", # Call subprocess.run with partial executable path.

src/_pytask/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def build( # noqa: C901, PLR0912, PLR0913
254254

255255
session = Session.from_config(config_)
256256

257-
except (ConfigurationError, Exception):
257+
except (ConfigurationError, Exception): # noqa: BLE001
258258
console.print(Traceback(sys.exc_info()))
259259
session = Session(exit_code=ExitCode.CONFIGURATION_FAILED)
260260

src/_pytask/click.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def parse_args(self, ctx: Context, args: list[str]) -> list[str]:
174174
opts, args, param_order = parser.parse_args(args=args)
175175

176176
for param in _iter_params_for_processing(param_order, self.get_params(ctx)):
177-
value, args = param.handle_parse_result(ctx, opts, args)
177+
_value, args = param.handle_parse_result(ctx, opts, args)
178178

179179
if args and not ctx.allow_extra_args and not ctx.resilient_parsing:
180180
ctx.fail(

src/_pytask/collect_command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def collect(**raw_config: Any | None) -> NoReturn:
6363
config = pm.hook.pytask_configure(pm=pm, raw_config=raw_config)
6464
session = Session.from_config(config)
6565

66-
except (ConfigurationError, Exception): # pragma: no cover
66+
except (ConfigurationError, Exception): # noqa: BLE001 # pragma: no cover
6767
session = Session(exit_code=ExitCode.CONFIGURATION_FAILED)
6868
console.print_exception()
6969

src/_pytask/dag_command.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def dag(**raw_config: Any) -> int:
8787
config = pm.hook.pytask_configure(pm=pm, raw_config=raw_config)
8888
session = Session.from_config(config)
8989

90-
except (ConfigurationError, Exception): # pragma: no cover
90+
except (ConfigurationError, Exception): # noqa: BLE001 # pragma: no cover
9191
console.print_exception()
9292
session = Session(exit_code=ExitCode.CONFIGURATION_FAILED)
9393

@@ -183,7 +183,7 @@ def build_dag(raw_config: dict[str, Any]) -> nx.DiGraph:
183183

184184
session = Session.from_config(config)
185185

186-
except (ConfigurationError, Exception): # pragma: no cover
186+
except (ConfigurationError, Exception): # noqa: BLE001 # pragma: no cover
187187
console.print_exception()
188188
session = Session(exit_code=ExitCode.CONFIGURATION_FAILED)
189189

src/_pytask/mark/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def markers(**raw_config: Any) -> NoReturn:
5959
config = pm.hook.pytask_configure(pm=pm, raw_config=raw_config)
6060
session = Session.from_config(config)
6161

62-
except (ConfigurationError, Exception): # pragma: no cover
62+
except (ConfigurationError, Exception): # noqa: BLE001 # pragma: no cover
6363
console.print_exception()
6464
session = Session(exit_code=ExitCode.CONFIGURATION_FAILED)
6565

src/_pytask/profile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def profile(**raw_config: Any) -> NoReturn:
121121
config = pm.hook.pytask_configure(pm=pm, raw_config=raw_config)
122122
session = Session.from_config(config)
123123

124-
except (ConfigurationError, Exception): # pragma: no cover
124+
except (ConfigurationError, Exception): # noqa: BLE001 # pragma: no cover
125125
session = Session(exit_code=ExitCode.CONFIGURATION_FAILED)
126126
console.print(Traceback(sys.exc_info()))
127127

tests/test_capture.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,15 +188,15 @@ def test_capturing_basic_api(self, method):
188188
assert outerr == ("", "")
189189
print("hello")
190190
capman.suspend()
191-
out, err = capman.read()
191+
out, _err = capman.read()
192192
if method == CaptureMethod.NO:
193193
assert old == (sys.stdout, sys.stderr, sys.stdin)
194194
else:
195195
assert not out
196196
capman.resume()
197197
print("hello")
198198
capman.suspend()
199-
out, err = capman.read()
199+
out, _err = capman.read()
200200
if method != CaptureMethod.NO:
201201
assert out == "hello\n"
202202
capman.stop_capturing()
@@ -624,7 +624,7 @@ def test_capture_results_accessible_by_attribute(self):
624624
def test_capturing_readouterr_unicode(self):
625625
with self.getcapture() as cap:
626626
print("hxąć")
627-
out, err = cap.readouterr()
627+
out, _err = cap.readouterr()
628628
assert out == "hxąć\n"
629629

630630
def test_reset_twice_error(self):
@@ -656,8 +656,8 @@ def test_capturing_error_recursive(self):
656656
print("cap1")
657657
with self.getcapture() as cap2:
658658
print("cap2")
659-
out2, err2 = cap2.readouterr()
660-
out1, err1 = cap1.readouterr()
659+
out2, _err2 = cap2.readouterr()
660+
out1, _err1 = cap1.readouterr()
661661
assert out1 == "cap1\n"
662662
assert out2 == "cap2\n"
663663

@@ -702,8 +702,8 @@ def test_capturing_error_recursive(self):
702702
print("cap1")
703703
with self.getcapture() as cap2:
704704
print("cap2")
705-
out2, err2 = cap2.readouterr()
706-
out1, err1 = cap1.readouterr()
705+
out2, _err2 = cap2.readouterr()
706+
out1, _err1 = cap1.readouterr()
707707
assert out1 == "cap1\ncap2\n"
708708
assert out2 == "cap2\n"
709709

tests/test_compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,5 @@ def test_no_version_raises(monkeypatch):
149149
sys.modules[name] = module
150150
monkeypatch.setitem(_MINIMUM_VERSIONS, name, "1.0.0")
151151

152-
with pytest.raises(ImportError, match="Can't determine .* fakemodule"):
152+
with pytest.raises(ImportError, match=r"Can't determine .* fakemodule"):
153153
import_optional_dependency(name)

0 commit comments

Comments
 (0)