Skip to content

Commit

Permalink
reorder folder layout
Browse files Browse the repository at this point in the history
  • Loading branch information
semiversus committed Sep 8, 2018
1 parent 3086ebd commit 013d45a
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 24 deletions.
10 changes: 6 additions & 4 deletions broqer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# -*- coding: utf-8 -*-
from .default_error_handler import default_error_handler
from .core import StatefulPublisher, Disposable, Publisher, Subscriber, \
SubscriptionDisposable, SubscriptionError, NONE
from .types import NONE
from .disposable import Disposable, SubscriptionDisposable
from .publisher import Publisher, StatefulPublisher, SubscriptionError
from .subscriber import Subscriber

from .hub import Hub, SubHub
from .subject import Subject, Value

from .op import operator_overloading # noqa: F401enable operator overloading
from .op import operator_overloading # noqa: F401 enable operator overloading

__author__ = 'Günther Jena'
__email__ = 'guenther@jena.at'
Expand All @@ -15,5 +17,5 @@
__all__ = [
'StatefulPublisher', 'Disposable', 'Publisher', 'Subscriber',
'SubscriptionDisposable', 'SubscriptionError', 'NONE', 'Hub',
'SubHub', 'Subject', 'Value', 'default_error_handler'
'SubHub', 'Subject', 'Value', 'default_error_handler',
]
14 changes: 0 additions & 14 deletions broqer/core/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion broqer/core/disposable.py → broqer/disposable.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from broqer.core import Publisher, Subscriber # noqa: F401
from broqer import Publisher, Subscriber # noqa: F401


class Disposable(metaclass=ABCMeta):
Expand Down
5 changes: 5 additions & 0 deletions broqer/hub/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from .hub import Hub, SubHub, Topic, MetaTopic

__all__ = [
'Hub', 'SubHub', 'Topic', 'MetaTopic'
]
4 changes: 2 additions & 2 deletions broqer/hub.py → broqer/hub/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
>>> hub['value1'].emit(3)
Traceback (most recent call last):
...
broqer.core.publisher.SubscriptionError: Only one emit will be stored ...
broqer.publisher.SubscriptionError: Only one emit will be stored ...
Assign a publisher to a hub topic:
Expand Down Expand Up @@ -63,7 +63,7 @@
>>> _ = hub.assign('value2', Value(0))
Traceback (most recent call last):
...
broqer.core.publisher.SubscriptionError: Topic 'value2' already assigned
broqer.publisher.SubscriptionError: Topic 'value2' already assigned
Meta data
---------
Expand Down
4 changes: 2 additions & 2 deletions broqer/core/publisher.py → broqer/publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import asyncio
from typing import TYPE_CHECKING, Any, Callable, Union

from broqer.core import NONE, SubscriptionDisposable
from broqer import NONE, SubscriptionDisposable

if TYPE_CHECKING:
from broqer.core import Subscriber # noqa: F401
from broqer import Subscriber # noqa: F401


class SubscriptionError(ValueError):
Expand Down
2 changes: 1 addition & 1 deletion broqer/core/subscriber.py → broqer/subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from abc import ABCMeta, abstractmethod
from typing import Any

from broqer.core import Publisher # noqa: F401
from broqer import Publisher # noqa: F401


class Subscriber(metaclass=ABCMeta): # pylint: disable=too-few-public-methods
Expand Down
File renamed without changes.

0 comments on commit 013d45a

Please sign in to comment.