Make pylint shut up
This commit is contained in:
parent
219b75524b
commit
70868e1d99
@ -395,10 +395,11 @@ class Command:
|
|||||||
raise TypeError("{}: Legacy tuple type annotation!".format(
|
raise TypeError("{}: Legacy tuple type annotation!".format(
|
||||||
self.name))
|
self.name))
|
||||||
elif getattr(typ, '__origin__', None) is typing.Union or (
|
elif getattr(typ, '__origin__', None) is typing.Union or (
|
||||||
|
# Older Python 3.5 patch versions
|
||||||
|
# pylint: disable=no-member,useless-suppression
|
||||||
hasattr(typing, 'UnionMeta') and
|
hasattr(typing, 'UnionMeta') and
|
||||||
isinstance(typ, typing.UnionMeta)):
|
isinstance(typ, typing.UnionMeta)):
|
||||||
# this is... slightly evil, I know
|
# this is... slightly evil, I know
|
||||||
# pylint: disable=no-member,useless-suppression
|
|
||||||
try:
|
try:
|
||||||
types = list(typ.__args__)
|
types = list(typ.__args__)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
Loading…
Reference in New Issue
Block a user