Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 42b63b9

Browse filesBrowse files
authored
Support ruff 0.8.0 by setting ruff target-version to py38 (#24492)
`ruff` 0.8.0 (released 2024-11-22) no longer defaults to supporting Python 3.8, > Ruff now defaults to Python 3.9 instead of 3.8 if no explicit Python version > is configured using [`ruff.target-version`](https://docs.astral.sh/ruff/settings/#target-version) > or [`project.requires-python`](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#python-requires) > ([https://github.com/microsoft/vscode-python/pull/13896](https://github.com/astral-sh/ruff/pull/13896)) > — https://github.com/astral-sh/ruff/blob/f3dac27e9aa6ac6a20fc2fb27ff2e4f5d369b076/CHANGELOG.md#080 We want to support Python 3.8 until February 2025, so we need to set `target-version`. > The minimum Python version to target, e.g., when considering automatic code > upgrades, like rewriting type annotations. Ruff will not propose changes > using features that are not available in the given version. > — https://docs.astral.sh/ruff/settings/#target-version Can be used as an alternative to #24488 until py38 support is dropped. This PR also reverts the pinning of `ruff` merged in #24484.
1 parent 4f7165f commit 42b63b9
Copy full SHA for 42b63b9

File tree

Expand file treeCollapse file tree

3 files changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+3
-2
lines changed

‎.github/actions/lint/action.yml

Copy file name to clipboardExpand all lines: .github/actions/lint/action.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ runs:
4343

4444
- name: Run Ruff
4545
run: |
46-
python -m pip install -U "ruff<0.8.0"
46+
python -m pip install -U "ruff"
4747
python -m ruff check .
4848
python -m ruff format --check
4949
working-directory: python_files

‎python_files/pyproject.toml

Copy file name to clipboardExpand all lines: python_files/pyproject.toml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ ignore = [
2323

2424
[tool.ruff]
2525
line-length = 100
26+
target-version = "py38"
2627
exclude = [
2728
"**/.data",
2829
"lib",

‎python_files/visualstudio_py_testlauncher.py

Copy file name to clipboardExpand all lines: python_files/visualstudio_py_testlauncher.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def send_event(self, name, **args):
130130
body = {"type": "event", "seq": self.seq, "event": name, "body": args}
131131
self.seq += 1
132132
content = json.dumps(body).encode("utf8")
133-
headers = ("Content-Length: %d\n\n" % (len(content),)).encode("utf8")
133+
headers = f"Content-Length: {len(content)}\n\n".encode()
134134
self.socket.send(headers)
135135
self.socket.send(content)
136136

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.