Skip to content

Commit

Permalink
[Bug] Fix error when loading a mocked stream when dependencies are no…
Browse files Browse the repository at this point in the history
…t available (#8)

* Update pyproject.toml

* Update _not_implemented.py

Fix issue in setting static var for a dynamic class
  • Loading branch information
eterna2 committed Oct 28, 2020
1 parent 06e10c3 commit f106c22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions iotoolz/extensions/_not_implemented.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ def mock_stream(supported_schemas: Set[str], msg: str) -> Type[AbcStream]:
class NotImplementedStream(AbcStream):
"""NotImplementedStream is a mock stream interface for extension streams that does not have the required dependencies installed."""

supported_schemas = supported_schemas

def __init__(self, *args, **kwargs): # pylint: disable=super-init-not-called
raise NotImplementedError(msg)

Expand All @@ -23,4 +21,6 @@ def write_from_fileobj_(
) -> StreamInfo:
raise NotImplementedError(msg)

NotImplementedStream.supported_schemas = supported_schemas

return NotImplementedStream
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "iotoolz"
version = "0.1.0-rc-4"
version = "0.1.0-rc-5"
description = "Consistent io iterface to read and write from/to both local and different remote resources (e.g. http, s3)"
keywords = ["io", "stream", "requests", "ftp", "s3"]
authors = ["eterna2 <eterna2@hotmail.com>"]
Expand Down

0 comments on commit f106c22

Please sign in to comment.