Closed richterdavid closed 4 months ago
Here's the precommit output for a dummy change on my branch for issue 155.
> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file -
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
black....................................................................Failed
- hook id: black
- files were modified by this hook
reformatted src/zimscraperlib/zim/creator.py
All done! ✨ 🍰 ✨
1 file reformatted.
ruff.....................................................................Passed
pyright (system).........................................................Failed
- hook id: pyright
- exit code: 1
/home/david/github/python-scraperlib/src/zimscraperlib/zim/creator.py
/home/david/github/python-scraperlib/src/zimscraperlib/zim/creator.py:131:17 - error: Expected 1 more positional argument (reportCallIssue)
/home/david/github/python-scraperlib/src/zimscraperlib/zim/creator.py:157:21 - error: Cannot instantiate abstract class "BytesIO"
"IO.mode" is not implemented (reportAbstractUsage)
/home/david/github/python-scraperlib/src/zimscraperlib/zim/creator.py:166:32 - error: Argument missing for parameter "key" (reportCallIssue)
/home/david/github/python-scraperlib/src/zimscraperlib/zim/creator.py:180:20 - error: Expected 1 more positional argument (reportCallIssue)
/home/david/github/python-scraperlib/src/zimscraperlib/zim/creator.py:205:66 - error: Expected type expression but received "_alias" (reportGeneralTypeIssues)
/home/david/github/python-scraperlib/src/zimscraperlib/zim/creator.py:227:68 - error: Expected type expression but received "_alias" (reportGeneralTypeIssues)
/home/david/github/python-scraperlib/src/zimscraperlib/zim/creator.py:255:15 - error: Expected type expression but received "_alias" (reportGeneralTypeIssues)
/home/david/github/python-scraperlib/src/zimscraperlib/zim/creator.py:303:19 - error: Variable not allowed in type expression (reportInvalidTypeForm)
/home/david/github/python-scraperlib/src/zimscraperlib/zim/creator.py:362:19 - error: Variable not allowed in type expression (reportInvalidTypeForm)
9 errors, 0 warnings, 0 informations
These issues are linked to your local setup.
Pyright version is pinned (see https://github.com/openzim/python-scraperlib/blob/7d498319baadba715316c15cf9857ff2f6974a00/pyproject.toml#L43) so rules are fixed, and pyright is invoked in the CI (see https://github.com/openzim/python-scraperlib/blob/7d498319baadba715316c15cf9857ff2f6974a00/.github/workflows/QA.yaml#L34) which is green.
Perhaps it's an update in
pyright
, but I'm seeing errors during precommit in the two files below, on main branch, that are interfering with my work on issue 155. More generally, it seems like this is likely to be an issue throughout this repo, and in all the other repos.