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

Python3.10 support. #81

Merged
merged 15 commits into from
Nov 8, 2021
Merged

Python3.10 support. #81

merged 15 commits into from
Nov 8, 2021

Conversation

hadialqattan
Copy link
Owner

Fixes: #78

@codeclimate
Copy link

codeclimate bot commented Oct 15, 2021

Code Climate has analyzed commit 1f43c0e and detected 0 issues on this pull request.

View more on Code Climate.

@@ -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"),

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

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.

@henryiii
Copy link

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.

pyproject.toml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Nov 7, 2021

Codecov Report

Merging #81 (26f3dec) into master (bcbaf4a) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #81   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines         2469      2480   +11     
=========================================
+ Hits          2469      2480   +11     
Impacted Files Coverage Δ
.github/test_ci_status.py 100.00% <100.00%> (ø)
pycln/utils/scan.py 100.00% <100.00%> (ø)
tests/test_config.py 100.00% <100.00%> (ø)
tests/test_pathu.py 100.00% <100.00%> (ø)
tests/test_refactor.py 100.00% <100.00%> (ø)
tests/test_scan.py 100.00% <100.00%> (ø)
tests/test_transform.py 100.00% <100.00%> (ø)

@hadialqattan
Copy link
Owner Author

This PR will be merged after supporting the new case-matching syntax (very soon).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Python 3.10 Support
3 participants