-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
pre-commit failing on mypy hook with at least a 'Module has no attribute "getuid" error' #11343
Comments
I've noticed
I can confirm that the mypy hook passes after adding |
WarrenTheRabbit
added a commit
to WarrenTheRabbit/pytest
that referenced
this issue
Aug 24, 2023
On Windows 10.0.19045, the mypy hook is failing on pre-commit because of two [attr-defined] errors, which prevents me from staging stages. The problem was first reported in pytest-dev#11343. This PR solves the problem by adding `type ignore` comments to the erroring lines: ``` src\_pytest\compat.py:324: error: Module has no attribute "getuid"; maybe "getpid" or "getppid"? [attr-defined] testing\test_parseopt.py:294: error: Module has no attribute "getencoding" [attr-defined] ```
This was referenced Aug 26, 2023
nicoddemus
pushed a commit
that referenced
this issue
Sep 9, 2023
Co-authored-by: Warren Markham <rabbitsinwarrens@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 mypy 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
outputpytest and operating system versions
minimal example
If I discard my changes and do
pre-commit run --all-files
, everything passes or is skipped except forThe text was updated successfully, but these errors were encountered: