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

style: Bump Black's target Python versions for Python 3.9 minimum #4347

Merged
merged 2 commits into from
Sep 19, 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 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ requires-python = ">=3.9"
[tool.black]
required-version = '24'
line-length = 88
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
# 'extend-exclude' excludes files or directories in addition to the defaults
extend-exclude = '''
(
Expand Down
7 changes: 4 additions & 3 deletions scripts/g.extension/g.extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,10 @@ def replace_shebang_win(python_file):
cur_dir = os.path.dirname(python_file)
tmp_name = os.path.join(cur_dir, gs.tempname(12))

with codecs.open(python_file, "r", encoding="utf8") as in_file, codecs.open(
tmp_name, "w", encoding="utf8"
) as out_file:
with (
codecs.open(python_file, "r", encoding="utf8") as in_file,
codecs.open(tmp_name, "w", encoding="utf8") as out_file,
):
for line in in_file:
new_line = line.replace(
"#!/usr/bin/env python\n", "#!/usr/bin/env python3\n"
Expand Down
Loading