diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b365818..472a648 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.26.3 + rev: 0.27.0 hooks: - id: check-github-workflows @@ -30,12 +30,12 @@ repos: - id: mdformat - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.9.1 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.287 + rev: v0.0.292 hooks: - id: ruff args: ["--fix"] 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 = {