Skip to content

Commit 09235ae

Browse files
committed
Cleaning up dependencies and fixing a mutation
1 parent 74814bc commit 09235ae

4 files changed

Lines changed: 13 additions & 4 deletions

File tree

annotated_logger/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
if TYPE_CHECKING: # pragma: no cover
2929
from collections.abc import MutableMapping
3030

31-
VERSION = "1.1.3" # pragma: no mutate
31+
VERSION = "1.2.0" # pragma: no mutate
3232

3333
T = TypeVar("T")
3434
P = ParamSpec("P")

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ dependencies = [
6161
"pyright",
6262
"pytest",
6363
"pytest-cov",
64+
"pytest-forked",
6465
"pytest-freezer",
6566
"pytest-github-actions-annotate-failures",
6667
"pytest-mock",

requirements/requirements-dev.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
# - pyright
88
# - pytest
99
# - pytest-cov
10+
# - pytest-forked
1011
# - pytest-freezer
1112
# - pytest-github-actions-annotate-failures
1213
# - pytest-mock
1314
# - requests-mock
1415
# - ruff
1516
# - typing_extensions
16-
# - pychoir
1717
# - makefun
18+
# - pychoir
1819
# - python-json-logger
1920
# - requests
2021
#
@@ -69,6 +70,8 @@ pony==0.7.17
6970
# via mutmut
7071
pre-commit==3.7.1
7172
# via hatch.envs.dev
73+
py==1.11.0
74+
# via pytest-forked
7275
pychoir==0.0.27
7376
# via hatch.envs.dev
7477
pyright==1.1.376
@@ -77,11 +80,14 @@ pytest==8.2.2
7780
# via
7881
# hatch.envs.dev
7982
# pytest-cov
83+
# pytest-forked
8084
# pytest-freezer
8185
# pytest-github-actions-annotate-failures
8286
# pytest-mock
8387
pytest-cov==5.0.0
8488
# via hatch.envs.dev
89+
pytest-forked==1.6.0
90+
# via hatch.envs.dev
8591
pytest-freezer==0.4.8
8692
# via hatch.envs.dev
8793
pytest-github-actions-annotate-failures==0.2.0

test/test_plugins.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def test_field_missing_strict(self, annotated_logger_mock):
208208

209209
def test_field_missing_not_strict(self, annotated_logger_mock):
210210
annotate_logs = AnnotatedLogger(
211-
plugins=[RenamerPlugin(strict=False, made_up_field="some_other_field")],
211+
plugins=[RenamerPlugin(made_up_field="some_other_field")],
212212
name="annotated_logger.test_plugins",
213213
config=False,
214214
).annotate_logs
@@ -217,7 +217,9 @@ def test_field_missing_not_strict(self, annotated_logger_mock):
217217
wrapped()
218218

219219
record = annotated_logger_mock.records[0]
220-
with pytest.raises(AttributeError):
220+
with pytest.raises(
221+
AttributeError, match="'LogRecord' object has no attribute 'failed_plugins'"
222+
):
221223
_ = record.failed_plugins
222224

223225

0 commit comments

Comments
 (0)