Skip to content

Commit

Permalink
Merge pull request #19 from Zsailer/bugs
Browse files Browse the repository at this point in the history
Fix minor bugs in Listeners API
  • Loading branch information
Zsailer authored Aug 25, 2022
2 parents 272d998 + 93cf241 commit fe79540
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions jupyter_events/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,6 @@ def add_listener(
if not callable(listener):
raise TypeError("`listener` must be a callable")

if schema_id not in self.schemas:
raise SchemaNotRegistered(
"The schema given for this listener has not be registered yet."
)

signature = inspect.signature(listener)

async def listener_signature(
Expand All @@ -277,7 +272,7 @@ async def listener_signature(
self._modified_listeners[schema_id].add(listener)
return
self._unmodified_listeners[schema_id].add(listener)
for id in self.listeners:
for id in self.schemas.schema_ids:
if schema_id is None or id == schema_id:
if modified:
self._modified_listeners[id].add(listener)
Expand Down

0 comments on commit fe79540

Please sign in to comment.