You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I take existing code in main and run the pre-commit checks installed by make devready, it fails, which means contributors cannot commit code to many existing files without disabling the pre-commit hook or fixing things unrelated to their change.
To Reproduce
Add a trivial edit to an existing git-tracked file which should be committable and not cause lint failures.
(venv) ➜ biocommons.seqrepo-clean git:(main) ✗ echo "# blah" >> src/biocommons/seqrepo/cli.py
(venv) ➜ biocommons.seqrepo-clean git:(main) ✗ git add ./src/biocommons/seqrepo/cli.py
(venv) ➜ biocommons.seqrepo-clean git:(main) ✗ git commit -m "throwaway"
flake8...................................................................Passed
pyright..................................................................Failed
- hook id: pyright
- exit code: 1
/Users/kferrite/dev/biocommons.seqrepo-clean/src/biocommons/seqrepo/cli.py
/Users/kferrite/dev/biocommons.seqrepo-clean/src/biocommons/seqrepo/cli.py:331:37 - error: "execute" is not a known member of "None" (reportOptionalMemberAccess)
/Users/kferrite/dev/biocommons.seqrepo-clean/src/biocommons/seqrepo/cli.py:399:13 - error: Function declaration "_rec_iterator" is obscured by a declaration of the same name (reportRedeclaration)
/Users/kferrite/dev/biocommons.seqrepo-clean/src/biocommons/seqrepo/cli.py:411:13 - error: Function declaration "_rec_iterator" is obscured by a declaration of the same name (reportRedeclaration)
/Users/kferrite/dev/biocommons.seqrepo-clean/src/biocommons/seqrepo/cli.py:466:24 - error: Cannot access member "fetchone" for type "Generator[dict[Any, Any] | Unknown, Any, None]"
Member "fetchone" is unknown (reportAttributeAccessIssue)
/Users/kferrite/dev/biocommons.seqrepo-clean/src/biocommons/seqrepo/cli.py:697:53 - error: Cannot access member "seqinfo" for type "SeqRepo"
Member "seqinfo" is unknown (reportAttributeAccessIssue)
5 errors, 0 warnings, 0 informations
isort....................................................................Passed
black....................................................................Passed
(venv) ➜ biocommons.seqrepo-clean git:(main) ✗ echo $?
1
Expected behavior
The git commit should succeed with exit code 0.
The text was updated successfully, but these errors were encountered:
Describe the bug
When I take existing code in
main
and run the pre-commit checks installed bymake devready
, it fails, which means contributors cannot commit code to many existing files without disabling the pre-commit hook or fixing things unrelated to their change.To Reproduce
Add a trivial edit to an existing git-tracked file which should be committable and not cause lint failures.
This fails on
main
.Actual behavior
Expected behavior
The
git commit
should succeed with exit code 0.The text was updated successfully, but these errors were encountered: