Skip to content

Commit c353da3

Browse files
bibajzTinche
authored andcommitted
Add forgotten is_bare check for unspecified Tuple
* Tuple.__args__ is equal to (), which is not covered by cases already listed
1 parent 1786aa3 commit c353da3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cattr/_compat.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ def is_mapping(type):
166166
bare_mapping_args = TypingMapping.__args__
167167
bare_dict_args = Dict.__args__
168168
bare_mutable_seq_args = TypingMutableSequence.__args__
169+
bare_tuple_args = Tuple.__args__
169170

170171
def is_bare(type):
171172
# Lower-cased generics in 3.7-8 do not have `__args__` attribute.
@@ -176,6 +177,7 @@ def is_bare(type):
176177
or args == bare_mapping_args
177178
or args == bare_dict_args
178179
or args == bare_mutable_seq_args
180+
or args == bare_tuple_args
179181
or args is None
180182
)
181183

0 commit comments

Comments
 (0)