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

Update pyupgrade to Python 3.7+ #580

Merged
merged 8 commits into from
Aug 11, 2023
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 @@ -19,7 +19,7 @@ repos:
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py36-plus]
args: [--py37-plus]

- repo: https://github.com/psf/black
rev: 22.12.0
Expand Down
2 changes: 1 addition & 1 deletion src/packaging/_musllinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _get_musl_version(executable: str) -> Optional[_MuslVersion]:
return None
if ld is None or "musl" not in ld:
return None
proc = subprocess.run([ld], stderr=subprocess.PIPE, universal_newlines=True)
proc = subprocess.run([ld], stderr=subprocess.PIPE, text=True)
return _parse_musl_version(proc.stderr)


Expand Down
2 changes: 1 addition & 1 deletion src/packaging/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def mac_platforms(
check=True,
env={"SYSTEM_VERSION_COMPAT": "0"},
stdout=subprocess.PIPE,
universal_newlines=True,
text=True,
).stdout
version = cast("MacVersion", tuple(map(int, version_str.split(".")[:2])))
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_musllinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def mock_run(*args, **kwargs):
pretend.call(
[ld_musl],
stderr=subprocess.PIPE,
universal_newlines=True,
text=True,
)
]
else:
Expand Down