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 #3132

Merged
merged 5 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
rev: v0.7.3
hooks:
- id: ruff
types: [file]
Expand Down
6 changes: 3 additions & 3 deletions src/trio/_core/_tests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2794,15 +2794,15 @@
assert RaisesGroup(ValueError, ValueError).matches(excinfo.value.__cause__)


if sys.version_info <= (3, 11):
if sys.version_info >= (3, 11):

def no_other_refs() -> list[object]:
return [sys._getframe(1)]
return []

Check warning on line 2800 in src/trio/_core/_tests/test_run.py

View check run for this annotation

Codecov / codecov/patch

src/trio/_core/_tests/test_run.py#L2800

Added line #L2800 was not covered by tests

else:

def no_other_refs() -> list[object]:
return []
return [sys._getframe(1)]


@pytest.mark.skipif(
Expand Down
15 changes: 6 additions & 9 deletions src/trio/_tests/type_tests/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,15 @@ def sync_attrs(path: trio.Path) -> None:
assert_type(path.as_posix(), str)
assert_type(path.as_uri(), str)
assert_type(path.is_absolute(), bool)
if sys.version_info > (3, 9):
assert_type(path.is_relative_to(path), bool)
assert_type(path.is_relative_to(path), bool)
assert_type(path.is_reserved(), bool)
assert_type(path.joinpath(path, "folder"), trio.Path)
assert_type(path.match("*.py"), bool)
assert_type(path.relative_to("/usr"), trio.Path)
if sys.version_info > (3, 12):
if sys.version_info >= (3, 12):
assert_type(path.relative_to("/", walk_up=True), bool)
assert_type(path.with_name("filename.txt"), trio.Path)
if sys.version_info > (3, 9):
assert_type(path.with_stem("readme"), trio.Path)
assert_type(path.with_stem("readme"), trio.Path)
assert_type(path.with_suffix(".log"), trio.Path)


Expand All @@ -75,7 +73,7 @@ async def async_attrs(path: trio.Path) -> None:
assert_type(await path.group(), str)
assert_type(await path.is_dir(), bool)
assert_type(await path.is_file(), bool)
if sys.version_info > (3, 12):
if sys.version_info >= (3, 12):
assert_type(await path.is_junction(), bool)
if sys.platform != "win32":
assert_type(await path.is_mount(), bool)
Expand All @@ -95,8 +93,7 @@ async def async_attrs(path: trio.Path) -> None:
assert_type(await path.owner(), str)
assert_type(await path.read_bytes(), bytes)
assert_type(await path.read_text(encoding="utf16", errors="replace"), str)
if sys.version_info > (3, 9):
assert_type(await path.readlink(), trio.Path)
assert_type(await path.readlink(), trio.Path)
assert_type(await path.rename("another"), trio.Path)
assert_type(await path.replace(path), trio.Path)
assert_type(await path.resolve(), trio.Path)
Expand All @@ -107,7 +104,7 @@ async def async_attrs(path: trio.Path) -> None:
assert_type(await path.rmdir(), None)
assert_type(await path.samefile("something_else"), bool)
assert_type(await path.symlink_to("somewhere"), None)
if sys.version_info > (3, 10):
if sys.version_info >= (3, 10):
assert_type(await path.hardlink_to("elsewhere"), None)
assert_type(await path.touch(), None)
assert_type(await path.unlink(missing_ok=True), None)
Expand Down
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pytest==8.3.3
# via -r test-requirements.in
requests==2.32.3
# via sphinx
ruff==0.7.1
ruff==0.7.3
# via -r test-requirements.in
sniffio==1.3.1
# via -r test-requirements.in
Expand Down
Loading