diff --git a/jupyter_events/logger.py b/jupyter_events/logger.py index 4bdcb59..5065da6 100644 --- a/jupyter_events/logger.py +++ b/jupyter_events/logger.py @@ -137,7 +137,7 @@ def register_event_schema(self, schema: SchemaType) -> None: Get this registered schema using the EventLogger.schema.get() method. """ - event_schema = self.schemas.register(schema) + event_schema = self.schemas.register(schema) # type:ignore[arg-type] key = event_schema.id self._modifiers[key] = set() self._modified_listeners[key] = set() diff --git a/jupyter_events/validators.py b/jupyter_events/validators.py index 31a7074..19b4827 100644 --- a/jupyter_events/validators.py +++ b/jupyter_events/validators.py @@ -38,13 +38,13 @@ ] METASCHEMA_REGISTRY: Registry = resources @ Registry() -JUPYTER_EVENTS_SCHEMA_VALIDATOR = Draft7Validator( # type: ignore +JUPYTER_EVENTS_SCHEMA_VALIDATOR = Draft7Validator( schema=EVENT_METASCHEMA, registry=METASCHEMA_REGISTRY, format_checker=draft7_format_checker, ) -JUPYTER_EVENTS_CORE_VALIDATOR = Draft7Validator( # type: ignore +JUPYTER_EVENTS_CORE_VALIDATOR = Draft7Validator( schema=EVENT_CORE_SCHEMA, registry=METASCHEMA_REGISTRY, format_checker=draft7_format_checker, diff --git a/tests/test_logger.py b/tests/test_logger.py index 17d8db9..96cef1b 100644 --- a/tests/test_logger.py +++ b/tests/test_logger.py @@ -489,7 +489,7 @@ async def test_noop_emit(): # it doesn't return immediately. We'll use the # MagicMock here to see if/when this method is called # to ensure `emit` is returning when it should. - el.schemas.validate_event = MagicMock(name="validate_event") + el.schemas.validate_event = MagicMock(name="validate_event") # type:ignore[method-assign] schema_id1 = "http://test/test" schema1 = {