Skip to content

Commit

Permalink
Ignore incorrect mypy errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
dangle committed Dec 21, 2017
1 parent 57a94d1 commit 4ab860a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion typet/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __call__(cls, *args, **kwargs):
*args, **kwargs)
else:
try:
cls.__instance__.__init__(*args, **kwargs)
cls.__instance__.__init__(*args, **kwargs) # type: ignore
except AttributeError:
pass
return cls.__instance__
Expand Down
2 changes: 1 addition & 1 deletion typet/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def __new__(mcs, # type: Type[_AnnotatedObjectMeta]
attrs[attr] is None and use_comment_type_hints) and
NoneType not in getattr(annotations[attr], '__args__', ())
]
return super(_AnnotatedObjectMeta, mcs).__new__(
return super(_AnnotatedObjectMeta, mcs).__new__( # type: ignore
mcs, name, bases, typed_attrs, **kwargs)

return _AnnotatedObjectMeta
Expand Down
2 changes: 1 addition & 1 deletion typet/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ class _StringMeta(_LengthBoundedMeta):

def __call__(cls, *args, **kwargs):
"""Instantiate a string object."""
return _STR_TYPE(*args, **kwargs)
return String[1:](*args, **kwargs)

def __instancecheck__(self, other):
# type: (Any) -> bool
Expand Down

0 comments on commit 4ab860a

Please sign in to comment.