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!
|
| try: | ||
| # Only for Python 3.3+ | ||
| import lzma # noqa | ||
| import lzma # noqa: F401 |
There was a problem hiding this comment.
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.
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.
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'
| try: | ||
| FileNotFoundError | ||
| except NameError: | ||
| FileNotFoundError = IOError # noqa | ||
| FileNotFoundError = IOError |
There was a problem hiding this comment.
ditto here - can we use if sys.version_info > ...?








poetry.pre-commitidsyesqarepopygreprepoexperimental_string_processingparameter for `blackRelates to: python-poetry/poetry#4776