-
Notifications
You must be signed in to change notification settings - Fork 20
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
Python3.10 support. #81
Conversation
Code Climate has analyzed commit 1f43c0e and detected 0 issues on this pull request. View more on Code Climate. |
tests/test_scan.py
Outdated
@@ -463,6 +464,24 @@ def test_visit_Expr(self, visit_Name, code, expec_names): | |||
), | |||
pytest.param("foobar: '' = 'x'\n", None, id="empty string annotation"), | |||
pytest.param("foobar = 'x'\n", None, id="no string annotation"), | |||
pytest.param( | |||
("def foo(bar: str | int):\n" " pass\n"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the union type syntax is also available in Python 3.7+ if you add the line
from __future__ import annotations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
110K matches for this on public GH repos, and most of them are using from __future__ import annotations
to enable the nicer syntax from newer Pythons.
pre-commit.ci has upgraded to 3.10, so this is now broken. Also, this is my pet peeve - it's artificially broken by adding <3.10, instead of actually being broken. If you must put an upper cap (you never must put one), then please release it as soon as the betas start coming out, or the RCs. I'd much rather see a real error on Python 3.10 than just having it break like this. |
Codecov Report
@@ Coverage Diff @@
## master #81 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 30 30
Lines 2469 2480 +11
=========================================
+ Hits 2469 2480 +11
|
This PR will be merged after supporting the new case-matching syntax (very soon). |
Fixes: #78