Skip to content

Commit 98ddbe6

Browse files
committed
Renaming Registry to ApiRegistry, as there are now multiple registries and this is more descriptive
1 parent cdb2ece commit 98ddbe6

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

lightbus/api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
__all__ = ["Api", "Event"]
1313

1414

15-
class Registry(object):
16-
# TODO: Rename to ApiRegistry
15+
class ApiRegistry(object):
1716
def __init__(self):
1817
self._apis: Dict[str, Api] = dict()
1918

lightbus/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import janus
1818

19-
from lightbus.api import Api, Registry
19+
from lightbus.api import Api, ApiRegistry
2020
from lightbus.client_worker import (
2121
ClientWorker,
2222
run_in_worker_thread,
@@ -104,7 +104,7 @@ def __init__(
104104
self.transport_registry = transport_registry
105105
self.features: List[Union[Feature, str]] = ALL_FEATURES
106106
self.set_features(features)
107-
self.api_registry = Registry()
107+
self.api_registry = ApiRegistry()
108108
self.plugin_registry = PluginRegistry()
109109
self.schema = None
110110
self._server_shutdown_queue: janus.Queue = None

tests/test_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22

33
from lightbus import Api, Event
4-
from lightbus.api import Registry
4+
from lightbus.api import ApiRegistry
55
from lightbus.exceptions import (
66
MisconfiguredApiOptions,
77
InvalidApiEventConfiguration,
@@ -23,7 +23,7 @@ class Meta:
2323

2424
@pytest.fixture()
2525
def registry():
26-
return Registry()
26+
return ApiRegistry()
2727

2828

2929
def test_api_named_default():

0 commit comments

Comments
 (0)