Skip to content
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.ci] pre-commit autoupdate #12910

Merged
merged 3 commits into from
Nov 8, 2024

Conversation

.pre-commit-config.yaml Outdated Show resolved Hide resolved
@@ -550,7 +550,7 @@ def snap(self) -> bytes:
res = self.tmpfile.buffer.read()
self.tmpfile.seek(0)
self.tmpfile.truncate()
return res
return res # type: ignore[return-value]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems it's a false positive, the return from read() is in fact bytes and not a buffer ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it can be a ReadableBuffer and not bytes: https://github.com/python/typeshed/blob/ca65e08/stdlib/_io.pyi#L126C43-L126C57

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we fix something then (cast to str) ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pre-commit bot removed our changes, I force pushed them back :)

@Pierre-Sassoulas
Copy link
Member

Pierre-Sassoulas commented Oct 24, 2024

There's some deprecation warning emitted by pylint:

************* Module _pytest.assertion.rewrite
src/_pytest/assertion/rewrite.py:296:12: W4904: Using deprecated class TraversableResources of module importlib.abc (deprecated-class)
************* Module _pytest.pathlib
src/_pytest/pathlib.py:170:8: W4903: Using deprecated argument onerror of method rmtree() (deprecated-argument)
************* Module test_runner
testing/test_runner.py:1030:11: W4906: Using deprecated attribute 'sys.last_type' (deprecated-attribute)
testing/test_runner.py:1031:22: W4906: Using deprecated attribute 'sys.last_value' (deprecated-attribute)
testing/test_runner.py:1035:11: W4906: Using deprecated attribute 'sys.last_value' (deprecated-attribute)
testing/test_runner.py:1036:11: W4906: Using deprecated attribute 'sys.last_traceback' (deprecated-attribute)

Created pylint-dev/pylint#10043 because it seems we know what we do here. Will handle in other merge request.

pre-commit-ci bot and others added 3 commits November 8, 2024 20:47
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.9 → v0.7.2](astral-sh/ruff-pre-commit@v0.6.9...v0.7.2)
- [github.com/adamchainz/blacken-docs: 1.19.0 → 1.19.1](adamchainz/blacken-docs@1.19.0...1.19.1)
- [github.com/pre-commit/mirrors-mypy: v1.11.2 → v1.13.0](pre-commit/mirrors-mypy@v1.11.2...v1.13.0)
- [github.com/tox-dev/pyproject-fmt: 2.3.1 → v2.5.0](tox-dev/pyproject-fmt@2.3.1...v2.5.0)
- [github.com/asottile/pyupgrade: v3.18.0 → v3.19.0](asottile/pyupgrade@v3.18.0...v3.19.0)

[mypy] Remove useless noqa, add noqa for new false positives

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
@Pierre-Sassoulas
Copy link
Member

Thanks for the review @nicoddemus, I'm going to work on #12875 for pytest 8.4 next

@Pierre-Sassoulas Pierre-Sassoulas merged commit 9f9dabd into main Nov 8, 2024
29 checks passed
@Pierre-Sassoulas Pierre-Sassoulas deleted the pre-commit-ci-update-config branch November 8, 2024 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants