Closed seanjedi closed 1 year ago
EncodingWarning
was added in Python 3.10, so the error would trigger on older Python versions. It would be good to add a noqa: F821
comment on this line. Would you like to send a PR for this?
Sure I can work on this, will make this change soon
@bluetech Created a PR here: https://github.com/pytest-dev/pytest/pull/11360
The PR above has been merged, and the issue is no longer present on the most recent commit on main.
(base) ➜ pytest-sean git:(main) pre-commit run --all-files
black....................................................................Passed
blacken-docs.............................................................Passed
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
fix python encoding pragma...............................................Passed
check yaml...............................................................Passed
debug statements (python)................................................Passed
autoflake................................................................Passed
flake8...................................................................Passed
Reorder python imports...................................................Passed
pyupgrade................................................................Passed
setup-cfg-fmt............................................................Passed
type annotations not comments............................................Passed
mypy.....................................................................Passed
rst......................................................................Passed
changelog filenames..................................(no files to check)Skipped
py library is deprecated.................................................Passed
py.path usage is deprecated..............................................Passed
description of problem
On VS Code, I am attempting to commit a staged change of src_pytest\config__init__.py; however, the pre-commit hook fails on flake8 with command ouput:
Every other hook either passes or is skipped. I installed pre-commit and its hook on the pytest repo using
pip list output
pytest and operating system versions
minimal example
If I discard my changes and do pre-commit run --all-files, everything passes or is skipped except for: Issue with mypy that can be found here: https://github.com/pytest-dev/pytest/issues/11343 and