typeguard 4.5.1__tar.gz → 4.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {typeguard-4.5.1 → typeguard-4.5.2}/.github/workflows/publish.yml +2 -2
- {typeguard-4.5.1 → typeguard-4.5.2}/PKG-INFO +1 -1
- {typeguard-4.5.1 → typeguard-4.5.2}/docs/versionhistory.rst +6 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard/_checkers.py +2 -2
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard.egg-info/PKG-INFO +1 -1
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/test_checkers.py +18 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/.github/FUNDING.yml +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/.github/ISSUE_TEMPLATE/features_request.yaml +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/.github/SECURITY.md +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/.github/dependabot.yml +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/.github/pull_request_template.md +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/.github/workflows/test.yml +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/.gitignore +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/.pre-commit-config.yaml +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/.readthedocs.yml +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/LICENSE +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/README.rst +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/docs/api.rst +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/docs/conf.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/docs/contributing.rst +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/docs/extending.rst +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/docs/features.rst +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/docs/index.rst +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/docs/userguide.rst +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/pyproject.toml +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/setup.cfg +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard/__init__.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard/_config.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard/_decorators.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard/_exceptions.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard/_functions.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard/_importhook.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard/_memo.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard/_pytest_plugin.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard/_suppression.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard/_transformer.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard/_utils.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard/py.typed +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard.egg-info/SOURCES.txt +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard.egg-info/dependency_links.txt +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard.egg-info/entry_points.txt +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard.egg-info/requires.txt +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/src/typeguard.egg-info/top_level.txt +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/__init__.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/conftest.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/deferredannos.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/dummymodule.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/dummymodule_py312.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/mypy/negative.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/mypy/positive.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/mypy/test_type_annotations.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/test_functions.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/test_importhook.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/test_instrumentation.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/test_plugins.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/test_pytest_plugin.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/test_suppression.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/test_transformer.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/test_typechecked.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/test_utils.py +0 -0
- {typeguard-4.5.1 → typeguard-4.5.2}/tests/test_warn_on_error.py +0 -0
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
- name: Create packages
|
|
25
25
|
run: python -m build
|
|
26
26
|
- name: Archive packages
|
|
27
|
-
uses: actions/upload-artifact@
|
|
27
|
+
uses: actions/upload-artifact@v7
|
|
28
28
|
with:
|
|
29
29
|
name: dist
|
|
30
30
|
path: dist
|
|
@@ -38,7 +38,7 @@ jobs:
|
|
|
38
38
|
id-token: write
|
|
39
39
|
steps:
|
|
40
40
|
- name: Retrieve packages
|
|
41
|
-
uses: actions/download-artifact@
|
|
41
|
+
uses: actions/download-artifact@v8
|
|
42
42
|
with:
|
|
43
43
|
name: dist
|
|
44
44
|
path: dist
|
|
@@ -4,6 +4,12 @@ Version history
|
|
|
4
4
|
This library adheres to
|
|
5
5
|
`Semantic Versioning 2.0 <https://semver.org/#semantic-versioning-200>`_.
|
|
6
6
|
|
|
7
|
+
**4.5.2** (2026-05-14)
|
|
8
|
+
|
|
9
|
+
- Fixed ``IndexError`` raised from ``check_signature_compatible`` when the subject
|
|
10
|
+
method has no positional parameters
|
|
11
|
+
(`#550 <https://github.com/agronholm/typeguard/issues/550>`_; PR by @HackedRico)
|
|
12
|
+
|
|
7
13
|
**4.5.1** (2026-02-19)
|
|
8
14
|
|
|
9
15
|
- Fixed iterable unpacking incorrectly calculating the cut-off offset of the item list
|
|
@@ -761,11 +761,11 @@ def check_signature_compatible(subject: type, protocol: type, attrname: str) ->
|
|
|
761
761
|
]
|
|
762
762
|
|
|
763
763
|
# Remove the "self" parameter from the protocol arguments to match
|
|
764
|
-
if protocol_type == "instance":
|
|
764
|
+
if protocol_type == "instance" and protocol_args:
|
|
765
765
|
protocol_args.pop(0)
|
|
766
766
|
|
|
767
767
|
# Remove the "self" parameter from the subject arguments to match
|
|
768
|
-
if subject_type == "instance":
|
|
768
|
+
if subject_type == "instance" and subject_args:
|
|
769
769
|
subject_args.pop(0)
|
|
770
770
|
|
|
771
771
|
for protocol_arg, subject_arg in zip_longest(protocol_args, subject_args):
|
|
@@ -1404,6 +1404,24 @@ class TestProtocol:
|
|
|
1404
1404
|
f"few positional arguments"
|
|
1405
1405
|
)
|
|
1406
1406
|
|
|
1407
|
+
def test_subject_method_no_positional_params(self) -> None:
|
|
1408
|
+
class ZeroArg:
|
|
1409
|
+
def __call__(self) -> None:
|
|
1410
|
+
return None
|
|
1411
|
+
|
|
1412
|
+
class MyProtocol(Protocol):
|
|
1413
|
+
def meth(self, x: str) -> None:
|
|
1414
|
+
pass
|
|
1415
|
+
|
|
1416
|
+
class Foo:
|
|
1417
|
+
meth = ZeroArg()
|
|
1418
|
+
|
|
1419
|
+
pytest.raises(TypeCheckError, check_type, Foo(), MyProtocol).match(
|
|
1420
|
+
f"^{qualified_name(Foo)} is not compatible with the "
|
|
1421
|
+
f"{MyProtocol.__qualname__} protocol because its 'meth' method has too "
|
|
1422
|
+
f"few positional arguments"
|
|
1423
|
+
)
|
|
1424
|
+
|
|
1407
1425
|
def test_no_varargs(self) -> None:
|
|
1408
1426
|
class MyProtocol(Protocol):
|
|
1409
1427
|
def meth(self, *args: Any) -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|