Skip to content

Commit 77f3dbc

Browse files
committed
fix
1 parent ef1063a commit 77f3dbc

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

docs/source/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ Glossary
2424
Releases
2525
---------------------
2626

27+
v1.4.3
28+
================
29+
- Fixed an error when a subclass's generic accepts less types than the original
30+
31+
2732
v1.4.2
2833
================
2934
- Fixed issue with typing conversion.

tkclasswiz/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
SOFTWARE.
2828
"""
2929

30-
__version__ = "1.4.2"
30+
__version__ = "1.4.3"
3131

3232

3333
from .object_frame import *

tkclasswiz/object_frame/frame_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,10 @@ def remove_classes(types: list):
227227
# Process abstract classes and polymorphism
228228
new_origins = []
229229
for origin in cls.convert_types(origin):
230-
if issubclass_noexcept(origin, (Generic, Iterable)):
230+
if issubclass_noexcept(origin, Iterable):
231231
new_origins.append(origin[tuple(new_types)])
232+
elif issubclass_noexcept(origin, Generic):
233+
new_origins.append(origin[tuple(new_types[:len(origin.__parameters__)])])
232234
else:
233235
new_origins.append(origin)
234236

0 commit comments

Comments
 (0)