Skip to content

Commit e777828

Browse files
committed
silence some mypy errors
1 parent 167ed3c commit e777828

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

fs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Python filesystem abstraction layer.
22
"""
33

4-
__import__("pkg_resources").declare_namespace(__name__)
4+
__import__("pkg_resources").declare_namespace(__name__) # type: ignore
55

66
from ._version import __version__
77
from .enums import ResourceType, Seek

fs/opener/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
# Declare fs.opener as a namespace package
6-
__import__("pkg_resources").declare_namespace(__name__)
6+
__import__("pkg_resources").declare_namespace(__name__) # type: ignore
77

88
# Import objects into fs.opener namespace
99
from .base import Opener

fs/tarfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class TarFS(WrapFS):
112112
"gz": (".tar.gz", ".tgz"),
113113
}
114114

115-
def __new__(
115+
def __new__( # type: ignore
116116
cls,
117117
file, # type: Union[Text, BinaryIO]
118118
write=False, # type: bool

fs/zipfs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ class ZipFS(WrapFS):
163163
164164
"""
165165

166-
def __new__(
166+
# TODO: __new__ returning different types may be too 'magical'
167+
def __new__( # type: ignore
167168
cls,
168169
file, # type: Union[Text, BinaryIO]
169170
write=False, # type: bool

0 commit comments

Comments
 (0)