Skip to content

Commit 06392b3

Browse files
authored
Merge pull request #79 from github/dependency-bump
Bump dependencies
2 parents 62e1078 + fb3b184 commit 06392b3

File tree

8 files changed

+72
-72
lines changed

8 files changed

+72
-72
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ dmypy.json
132132
.mutmut-cache
133133
html/
134134

135+
# vim
136+
Session.vim
137+
135138
# Misc
136139
TODO.md
137140
junit.xml

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
33
# Ruff version.
4-
rev: v0.8.6
4+
rev: v0.14.0
55
hooks:
66
# Run the linter.
77
- id: ruff
88
# Run the formatter.
99
- id: ruff-format
1010
- repo: https://github.com/RobertCraigie/pyright-python
11-
rev: v1.1.390
11+
rev: v1.1.406
1212
hooks:
1313
- id: pyright
1414
# I don't love having to specify these here, but pre-commit only seems to work

annotated_logger/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
import logging.config
77
import time
88
import uuid
9-
from collections.abc import Iterator
9+
from collections.abc import Callable, Iterator
1010
from copy import copy, deepcopy
1111
from typing import (
1212
TYPE_CHECKING,
1313
Any,
14-
Callable,
1514
Concatenate,
1615
Literal,
1716
ParamSpec,
@@ -34,7 +33,7 @@
3433
# https://test.pypi.org/project/annotated-logger/
3534
# The dev versions in testpypi can then be pulled in to whatever project needed
3635
# the new feature.
37-
VERSION = "1.2.3" # pragma: no mutate
36+
VERSION = "1.2.4" # pragma: no mutate
3837

3938
T = TypeVar("T")
4039
P = ParamSpec("P")
@@ -732,7 +731,7 @@ def wrap_class(
732731
cls=wrapped, logger_base_name=logger_name
733732
)
734733
logger.debug("init")
735-
new = cast(AnnotatedClass[C_co], wrapped(*args, **kwargs))
734+
new = cast("AnnotatedClass[C_co]", wrapped(*args, **kwargs))
736735
new.annotated_logger = logger
737736
return new
738737

@@ -766,7 +765,7 @@ def wrap_function(*args: P.args, **kwargs: P.kwargs) -> R:
766765
post_call_attempted = True
767766
_attempt_post_call(post_call, logger, *new_args, **new_kwargs) # pyright: ignore[reportCallIssue]
768767
end_time = time.perf_counter()
769-
logger.annotate(run_time=f"{end_time - start_time :.1f}")
768+
logger.annotate(run_time=f"{end_time - start_time:.1f}")
770769
with contextlib.suppress(TypeError):
771770
logger.annotate(count=len(result)) # pyright: ignore[reportArgumentType]
772771

@@ -880,7 +879,7 @@ def _inject_by_kwarg(
880879
else:
881880
instance = False # pragma: no mutate
882881
logger, annotations = self._pick_correct_logger(
883-
function, instance, logger_base_name=logger_base_name
882+
function, instance=instance, logger_base_name=logger_base_name
884883
)
885884
if not provided:
886885
kwargs["annotated_logger"] = logger
@@ -904,7 +903,7 @@ def _inject_by_index( # noqa: PLR0913
904903
else:
905904
instance = False # pragma: no mutate
906905
logger, annotations = self._pick_correct_logger(
907-
function, instance, logger_base_name=logger_base_name
906+
function, instance=instance, logger_base_name=logger_base_name
908907
)
909908
if not provided:
910909
args.insert(index, logger)
@@ -927,6 +926,7 @@ def _check_parameters_for_self_and_cls(
927926
def _pick_correct_logger(
928927
self,
929928
function: Function[S, P, R],
929+
*,
930930
instance: object | bool,
931931
logger_base_name: str | None = None,
932932
) -> tuple[AnnotatedAdapter, Annotations | None]:

annotated_logger/plugins.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
import contextlib
44
import logging
5-
from typing import TYPE_CHECKING, Any, Callable
5+
from typing import TYPE_CHECKING, Any
66

77
from requests.exceptions import HTTPError
88

99
from annotated_logger.filter import AnnotatedFilter
1010

1111
if TYPE_CHECKING: # pragma: no cover
12+
from collections.abc import Callable
13+
1214
from annotated_logger import AnnotatedAdapter
1315

1416

requirements.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
# - requests
88
#
99

10-
certifi==2024.12.14
10+
certifi==2025.10.5
1111
# via requests
12-
charset-normalizer==3.4.1
12+
charset-normalizer==3.4.3
1313
# via requests
1414
idna==3.10
1515
# via requests
16-
makefun==1.15.6
16+
makefun==1.16.0
1717
# via hatch.envs.default
18-
pychoir==0.0.27
18+
pychoir==0.0.29
1919
# via hatch.envs.default
20-
python-json-logger==3.2.1
20+
python-json-logger==4.0.0
2121
# via hatch.envs.default
22-
requests==2.32.4
22+
requests==2.32.5
2323
# via hatch.envs.default
2424
urllib3==2.5.0
2525
# via requests

requirements/requirements-dev.txt

Lines changed: 48 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by hatch-pip-compile with Python 3.10
2+
# This file is autogenerated by hatch-pip-compile with Python 3.12
33
#
44
# - coverage
55
# - mutmut
@@ -20,128 +20,123 @@
2020
# - requests
2121
#
2222

23-
certifi==2024.12.14
23+
certifi==2025.10.5
2424
# via requests
2525
cfgv==3.4.0
2626
# via pre-commit
27-
charset-normalizer==3.4.1
27+
charset-normalizer==3.4.3
2828
# via requests
29-
click==8.1.8
29+
click==8.3.0
3030
# via mutmut
31-
coverage==7.6.10
31+
coverage==7.10.7
3232
# via
3333
# hatch.envs.dev
3434
# pytest-cov
35-
distlib==0.3.9
35+
distlib==0.4.0
3636
# via virtualenv
37-
exceptiongroup==1.2.2
38-
# via pytest
39-
filelock==3.16.1
37+
filelock==3.20.0
4038
# via virtualenv
41-
freezegun==1.5.1
39+
freezegun==1.5.5
4240
# via pytest-freezer
43-
identify==2.6.5
41+
identify==2.6.15
4442
# via pre-commit
4543
idna==3.10
4644
# via requests
47-
iniconfig==2.0.0
45+
iniconfig==2.1.0
4846
# via pytest
49-
junit-xml==1.8
47+
libcst==1.7.0
5048
# via mutmut
5149
linkify-it-py==2.0.3
5250
# via markdown-it-py
53-
makefun==1.15.6
51+
makefun==1.16.0
5452
# via hatch.envs.dev
55-
markdown-it-py==3.0.0
53+
markdown-it-py==4.0.0
5654
# via
5755
# mdit-py-plugins
5856
# rich
5957
# textual
60-
mdit-py-plugins==0.4.2
58+
mdit-py-plugins==0.5.0
6159
# via markdown-it-py
6260
mdurl==0.1.2
6361
# via markdown-it-py
64-
mutmut==3.2.2
62+
mutmut==3.3.1
6563
# via hatch.envs.dev
6664
nodeenv==1.9.1
6765
# via
6866
# pre-commit
6967
# pyright
70-
packaging==24.2
68+
packaging==25.0
7169
# via pytest
72-
parso==0.8.4
73-
# via mutmut
74-
platformdirs==4.3.6
70+
platformdirs==4.5.0
7571
# via
7672
# textual
7773
# virtualenv
78-
pluggy==1.5.0
79-
# via pytest
80-
pre-commit==4.0.1
74+
pluggy==1.6.0
75+
# via
76+
# pytest
77+
# pytest-cov
78+
pre-commit==4.3.0
8179
# via hatch.envs.dev
82-
pychoir==0.0.27
80+
pychoir==0.0.29
8381
# via hatch.envs.dev
84-
pygments==2.19.1
85-
# via rich
86-
pyright==1.1.391
82+
pygments==2.19.2
83+
# via
84+
# pytest
85+
# rich
86+
# textual
87+
pyright==1.1.406
8788
# via hatch.envs.dev
88-
pytest==8.3.4
89+
pytest==8.4.2
8990
# via
9091
# hatch.envs.dev
92+
# mutmut
9193
# pytest-cov
9294
# pytest-freezer
9395
# pytest-github-actions-annotate-failures
9496
# pytest-mock
9597
# pytest-randomly
96-
pytest-cov==6.0.0
98+
pytest-cov==7.0.0
9799
# via hatch.envs.dev
98100
pytest-freezer==0.4.9
99101
# via hatch.envs.dev
100-
pytest-github-actions-annotate-failures==0.2.0
102+
pytest-github-actions-annotate-failures==0.3.0
101103
# via hatch.envs.dev
102-
pytest-mock==3.14.0
104+
pytest-mock==3.15.1
103105
# via hatch.envs.dev
104-
pytest-randomly==3.16.0
106+
pytest-randomly==4.0.1
105107
# via hatch.envs.dev
106108
python-dateutil==2.9.0.post0
107109
# via freezegun
108-
python-json-logger==3.2.1
110+
python-json-logger==4.0.0
109111
# via hatch.envs.dev
110-
pyyaml==6.0.2
111-
# via pre-commit
112-
requests==2.32.4
112+
pyyaml==6.0.3
113+
# via
114+
# libcst
115+
# pre-commit
116+
requests==2.32.5
113117
# via
114118
# hatch.envs.dev
115119
# requests-mock
116120
requests-mock==1.12.1
117121
# via hatch.envs.dev
118-
rich==13.9.4
122+
rich==14.2.0
119123
# via textual
120-
ruff==0.8.6
124+
ruff==0.14.0
121125
# via hatch.envs.dev
122-
setproctitle==1.3.4
126+
setproctitle==1.3.7
123127
# via mutmut
124128
six==1.17.0
125-
# via
126-
# junit-xml
127-
# python-dateutil
128-
textual==1.0.0
129+
# via python-dateutil
130+
textual==6.2.1
129131
# via mutmut
130-
toml==0.10.2
131-
# via mutmut
132-
tomli==2.2.1
133-
# via
134-
# coverage
135-
# pytest
136-
typing-extensions==4.12.2
132+
typing-extensions==4.15.0
137133
# via
138134
# hatch.envs.dev
139135
# pyright
140-
# rich
141136
# textual
142137
uc-micro-py==1.0.3
143138
# via linkify-it-py
144139
urllib3==2.5.0
145140
# via requests
146-
virtualenv==20.28.1
141+
virtualenv==20.34.0
147142
# via pre-commit

test/test_decorator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,6 @@ def test_args_kwargs_splat_provided_not_instance(
615615
class TestNonClassBased:
616616
def test_annotated_logger_must_be_first(self):
617617
with pytest.raises(
618-
TypeError, match="^annotated_logger must be the first argument$"
618+
TypeError, match=r"^annotated_logger must be the first argument$"
619619
):
620-
import example.invalid_order # noqa: F401
620+
import example.invalid_order # noqa: F401 PLC0415

test/test_mocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def wrong_present_for_add_success(expected, missing=None, incorrect=None):
5858
else:
5959
incorrect_string = ", ".join(
6060
[
61-
f"\"Extra `{d['key']}` value is incorrect. Desired `{d['expected']}` ({type(d['expected'])}) , actual `{d['actual']}` ({type(d['actual'])})\""
61+
f'"Extra `{d["key"]}` value is incorrect. Desired `{d["expected"]}` ({type(d["expected"])}) , actual `{d["actual"]}` ({type(d["actual"])})"'
6262
for d in incorrect
6363
]
6464
)

0 commit comments

Comments
 (0)