-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Python 3.8 — PEP 572 compatibility #711
Comments
Thanks for reporting. We'll definitely add support for |
Ping? 3.8 beta 1 is out now and people are testing 3.8 in their staging setup. |
This is still not supported as 21 July 2019 in beta 2:
|
@rhettinger I've opened #943 for that. I thought I'd implement it fast last night but then I looked at the cpython grammar that implements this and realized this will take a while :) |
This seems not fixed properly: $ pre-commit try-repo https://github.com/psf/black --all-files --show-diff-on-failure
[INFO] Initializing environment for https://github.com/psf/black.
===============================================================================
Using config:
===============================================================================
repos:
- repo: https://github.com/psf/black
rev: c9689b80fbb108316b0330fc1ed444ccab419b02
hooks:
- id: black
===============================================================================
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
black....................................................................Failed
hookid: black
Files were modified by this hook. Additional output:
reformatted t.py
All done! ✨ 🍰 ✨
1 file reformatted.
pre-commit hook(s) made changes.
If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`.
To run `pre-commit` as part of git workflow, use `pre-commit install`.
All changes made by hooks:
diff --git a/t.py b/t.py
index 7aa9164..767c39b 100644
--- a/t.py
+++ b/t.py
@@ -1,2 +1,2 @@
-if (x := 1):
+if (x := 1) :
print(x) |
Operating system: Fedora 29 Linux
Python version: 3.8.0a1 (build from Python.org sources)
Black version: 18.9b0
Does also happen on master: yes, localy. on black.now.sh it fails with
type object 'FileMode' has no attribute 'from_configuration'
My example for a too long line in a file trying the upcoming PEP 572 Assignment Expressions failed with
The example is the following:
I don't think that this is an urgent issue, because Python 3.8 got its first alpha not long ago. I just wanted to test if it works and because it does not, and I haven't found an issue yet, I'm filing this one.
Thank you for your work!
The text was updated successfully, but these errors were encountered: