Skip to content

Commit

Permalink
silence some mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Nov 3, 2019
1 parent 167ed3c commit e777828
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Python filesystem abstraction layer.
"""

__import__("pkg_resources").declare_namespace(__name__)
__import__("pkg_resources").declare_namespace(__name__) # type: ignore

from ._version import __version__
from .enums import ResourceType, Seek
Expand Down
2 changes: 1 addition & 1 deletion fs/opener/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

# Declare fs.opener as a namespace package
__import__("pkg_resources").declare_namespace(__name__)
__import__("pkg_resources").declare_namespace(__name__) # type: ignore

# Import objects into fs.opener namespace
from .base import Opener
Expand Down
2 changes: 1 addition & 1 deletion fs/tarfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class TarFS(WrapFS):
"gz": (".tar.gz", ".tgz"),
}

def __new__(
def __new__( # type: ignore
cls,
file, # type: Union[Text, BinaryIO]
write=False, # type: bool
Expand Down
3 changes: 2 additions & 1 deletion fs/zipfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ class ZipFS(WrapFS):
"""

def __new__(
# TODO: __new__ returning different types may be too 'magical'
def __new__( # type: ignore
cls,
file, # type: Union[Text, BinaryIO]
write=False, # type: bool
Expand Down

0 comments on commit e777828

Please sign in to comment.