You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# example.py
from referencing import Registry, Resource
from referencing.jsonschema import DRAFT7
registry = Registry()
resource = Resource(contents="hello.json", specification=DRAFT7)
If I run mypy 1.14.1 on it with poetry run mypy example.py, I get this
example.py:6: error: Need type annotation for "registry" [var-annotated]
example.py:7: error: Unexpected keyword argument "contents" for "Resource" [call-arg]
example.py:7: error: Unexpected keyword argument "specification" for "Resource" [call-arg]
example.py:7: error: Need type annotation for "resource" [var-annotated]
Found 4 errors in 1 file (checked 1 source file)
Things work mostly with pyright, which is what the tests here use so I'd suggest you try that, but at some point we may investigate if mypy can be made to work.
referencing version 0.35.1
Let's say I have this snippet
If I run mypy 1.14.1 on it with
poetry run mypy example.py
, I get thisI see you have a
py.typed
here https://github.com/python-jsonschema/referencing/tree/main/referencing, but it's not working then correctlyThe text was updated successfully, but these errors were encountered: