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

Add mypy check #779

Merged
merged 3 commits into from May 3, 2022
Merged

Add mypy check #779

merged 3 commits into from May 3, 2022

Conversation

blink1073
Copy link
Collaborator

@blink1073 blink1073 commented Apr 7, 2022

Minimal typings support, mostly as a linter for now.

Uses new typings from jupyter_client.

I'm working on shipping minimal typings with traitlets and jupyter_core as well.

@codecov-commenter
Copy link

codecov-commenter commented Apr 7, 2022

Codecov Report

Merging #779 (d438492) into main (eff1b08) will decrease coverage by 0.09%.
The diff coverage is 62.96%.

@@            Coverage Diff             @@
##             main     #779      +/-   ##
==========================================
- Coverage   70.21%   70.12%   -0.10%     
==========================================
  Files          63       63              
  Lines        7494     7544      +50     
  Branches     1258     1258              
==========================================
+ Hits         5262     5290      +28     
- Misses       1851     1873      +22     
  Partials      381      381              
Impacted Files Coverage Δ
jupyter_server/auth/login.py 70.92% <0.00%> (ø)
jupyter_server/gateway/handlers.py 30.90% <0.00%> (-0.97%) ⬇️
jupyter_server/pytest_plugin.py 88.18% <0.00%> (ø)
jupyter_server/utils.py 62.37% <0.00%> (ø)
jupyter_server/gateway/managers.py 58.22% <39.28%> (-1.45%) ⬇️
jupyter_server/extension/handler.py 67.18% <53.33%> (+1.05%) ⬆️
jupyter_server/serverapp.py 65.25% <57.14%> (-0.07%) ⬇️
jupyter_server/services/contents/handlers.py 85.46% <60.00%> (ø)
jupyter_server/files/handlers.py 34.48% <66.66%> (+1.14%) ⬆️
jupyter_server/services/sessions/sessionmanager.py 88.26% <66.66%> (ø)
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eff1b08...d438492. Read the comment docs.

@blink1073 blink1073 marked this pull request as ready for review April 7, 2022 08:54
@Zsailer
Copy link
Member

Zsailer commented Apr 8, 2022

I think this is going to cause some pain for other PRs that will need to rebase. Maybe we should wait until (at least) identity is merged?

@blink1073
Copy link
Collaborator Author

Sounds fair, will mark as 2.0

@blink1073 blink1073 added this to the 2.0 milestone Apr 8, 2022
@blink1073 blink1073 force-pushed the add-mypy branch 3 times, most recently from faefd26 to b3a3336 Compare April 12, 2022 09:01
@blink1073
Copy link
Collaborator Author

This is ready now

add py.typed file

use typings from jupyter_client

fix typing

fix gateway tests
@blink1073
Copy link
Collaborator Author

I plan to merge this and cut the first alpha release tomorrow.

@Zsailer
Copy link
Member

Zsailer commented May 3, 2022

Do you think we should backport these changes?

I ask, because if we merge this and don't backport it, do you think it will cause issues for future backports? It seems like future backports might have conflicts with changes here and cause meeseeks to choke.

@blink1073
Copy link
Collaborator Author

Good point, I'll take care of the backporting of this one.

@blink1073 blink1073 merged commit 3e64fa5 into jupyter-server:main May 3, 2022
@blink1073 blink1073 deleted the add-mypy branch May 3, 2022 13:47
@blink1073
Copy link
Collaborator Author

@meeseeksdev please backport to 1.x

@lumberbot-app
Copy link

lumberbot-app bot commented May 3, 2022

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 1.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 3e64fa5eef7fba9f8e17c30cec688254adf913bd
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #779: Add mypy check'
  1. Push to a named branch:
git push YOURFORK 1.x:auto-backport-of-pr-779-on-1.x
  1. Create a PR against branch 1.x, I would have named this PR:

"Backport PR #779 on branch 1.x (Add mypy check)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

blink1073 added a commit to blink1073/jupyter_server that referenced this pull request May 3, 2022
(cherry picked from commit 3e64fa5)
blink1073 added a commit that referenced this pull request May 3, 2022
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.

None yet

3 participants