Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mypy #358

Merged
merged 7 commits into from
Sep 20, 2024
Merged

Fix mypy #358

merged 7 commits into from
Sep 20, 2024

Conversation

brichet
Copy link
Contributor

@brichet brichet commented Sep 19, 2024

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

Copy link
Contributor

Binder 👈 Launch a Binder on branch brichet/jupyter_collaboration/fix_mypy

@davidbrochart
Copy link
Collaborator

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

Copy link
Collaborator

@davidbrochart davidbrochart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, failures are unrelated, let's fix them in another PR.

@davidbrochart
Copy link
Collaborator

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
Copy link
Contributor Author

brichet commented Sep 19, 2024

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.

@davidbrochart davidbrochart merged commit bbb2f83 into jupyterlab:main Sep 20, 2024
11 of 20 checks passed
@brichet brichet deleted the fix_mypy branch September 20, 2024 08:30
@brichet
Copy link
Contributor Author

brichet commented Sep 20, 2024

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
Copy link
Collaborator

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

brichet added a commit to brichet/jupyter_collaboration that referenced this pull request Sep 20, 2024
@brichet brichet mentioned this pull request Sep 20, 2024
davidbrochart pushed a commit that referenced this pull request Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants