-
Notifications
You must be signed in to change notification settings - Fork 252
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
make .pre-commit-config.yaml similar to poetry repo #271
make .pre-commit-config.yaml similar to poetry repo #271
Conversation
bf46a8c
to
f262d3a
Compare
f262d3a
to
dccb44a
Compare
dccb44a
to
479f78a
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
try: | ||
# Only for Python 3.3+ | ||
import lzma # noqa | ||
import lzma # noqa: F401 |
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.
is python <3.3
compat still required here?
if we need it, we should use
if sys.version_info >= (3, 3):
import lzma
....
or similar
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.
I would try to avoid logic change to the code within this PR, because its only about formatting. I think this is better handled in #263 for example.
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.
ping @tony
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.
I think try
/catch
still makes sense here. It's true was originally an underlying version constraint.
lzma
is optionally built in. You can compile CPython without lzma
Could not figure out the flags, Not having the library seems to do it:
❯ sudo apt remove liblzma-dev
❯ make distclean
❯ ./configure
❯ make -j8
❯ ./python -V
Python 3.11.0a4+
❯ ./python -c 'import lzma'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/user/projects/c/cpython/Lib/lzma.py", line 27, in <module>
from _lzma import *
^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_lzma'
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.
that makes sense
try: | ||
FileNotFoundError | ||
except NameError: | ||
FileNotFoundError = IOError # noqa | ||
FileNotFoundError = IOError |
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.
ditto here - can we use if sys.version_info > ...
?
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.
same as above
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.
ping @tony
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.
In #263 I pushed a change removing this
poetry
.pre-commit
idsyesqa
repopygrep
repoexperimental_string_processing
parameter for `blackRelates to: python-poetry/poetry#4776