Skip to content

Commit b34e299

Browse files
committed
Fixed pytest issues. Fixes: #29
1 parent c70f3b8 commit b34e299

5 files changed

Lines changed: 11 additions & 83 deletions

File tree

.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ exclude_lines =
2121
raise NotImplementedError
2222
if 0:
2323
if __name__ == .__main__.:
24+
if typing.TYPE_CHECKING:

.travis.yml

Lines changed: 0 additions & 79 deletions
This file was deleted.

pytest.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ flake8-ignore =
1717
doctest_optionflags =
1818
ALLOW_UNICODE
1919
ALLOW_BYTES
20+
21+
asyncio_mode = strict

python_utils/containers.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
from __future__ import annotations
22

33
import abc
4-
from typing import Any
5-
from typing import Generator
4+
import typing
5+
from typing import Any, Generator
66

77
from . import types
88

9+
if typing.TYPE_CHECKING:
10+
import _typeshed # noqa: F401
11+
912
KT = types.TypeVar('KT')
1013
VT = types.TypeVar('VT')
1114
DT = types.Dict[KT, VT]
@@ -16,6 +19,7 @@
1619
DictUpdateArgs = types.Union[
1720
types.Mapping,
1821
types.Iterable[types.Union[types.Tuple[Any, Any], types.Mapping]],
22+
'_typeshed.SupportsKeysAndGetItem[KT, VT]',
1923
]
2024

2125

@@ -37,7 +41,7 @@ def __init__(
3741
def update(
3842
self,
3943
*args: DictUpdateArgs,
40-
**kwargs
44+
**kwargs: VT
4145
) -> None:
4246
if args:
4347
kwargs.update(*args)

python_utils/converters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def to_unicode(
181181
'''Convert objects to unicode, if needed decodes string with the given
182182
encoding and errors settings.
183183
184-
:rtype: unicode
184+
:rtype: str
185185
186186
>>> to_unicode(b'a')
187187
'a'

0 commit comments

Comments
 (0)