jupyterlab / jupyter-collaboration

A Jupyter Server Extension Providing Support for Y Documents
https://jupyterlab-realtime-collaboration.readthedocs.io/en/latest/
Other
168 stars 31 forks source link

Fix mypy #358

Closed brichet closed 2 months ago

brichet commented 2 months ago

This PR should fix mypy which fails with the bump_version.py file.

github-actions[bot] commented 2 months ago

Binder :point_left: Launch a Binder on branch _brichet/jupyter_collaboration/fixmypy

davidbrochart commented 2 months ago

I think we should just exclude this file from mypy, it's not typed at all.

davidbrochart commented 2 months ago

Wait, pre-commit is still failing? It means mypy is still analysing this file? Also, we don't need # type: ignore anymore:

from pkg_resources import parse_version  # type: ignore
brichet commented 2 months ago

Wait, pre-commit is still failing? It means mypy is still analysing this file?

Yes, I saw that...

Also, we don't need # type: ignore anymore:

from pkg_resources import parse_version  # type: ignore

The 2 first commits that I reverted fixed mypy for that file.

brichet commented 2 months ago

Thanks @davidbrochart.

Should we remove

    "^binder/jupyter_config\\.py$",
    "^scripts/bump_version\\.py$",
    "/setup\\.py$",
]

from pyproject.toml to avoid confusion, or is this useful for local run ?

davidbrochart commented 2 months ago

Yes I think it's still useful outside of pre-commit.