Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Oct 4, 2023
1 parent bf7e137 commit 1390c5b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jupyter_events/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions jupyter_events/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 1390c5b

Please sign in to comment.