From 9eaf857e18deaf9c406e5102c916ba14a4f4ff5a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 4 Oct 2023 02:52:55 +0000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#87) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/python-jsonschema/check-jsonschema: 0.26.3 → 0.27.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.26.3...0.27.0) - [github.com/psf/black: 23.7.0 → 23.9.1](https://github.com/psf/black/compare/23.7.0...23.9.1) - [github.com/astral-sh/ruff-pre-commit: v0.0.287 → v0.0.292](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.287...v0.0.292) * typing --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Steven Silvester --- .pre-commit-config.yaml | 6 +++--- jupyter_events/logger.py | 2 +- jupyter_events/validators.py | 4 ++-- tests/test_logger.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) 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 = {