Skip to content

Commit

Permalink
Format with ruff 0.9.0 (#5930)
Browse files Browse the repository at this point in the history
CI is failing due to a new ruff version
([example](https://github.com/posit-dev/positron/actions/runs/12693090155/job/35379904139)).
The changes seem good though.
  • Loading branch information
seeM authored Jan 9, 2025
1 parent 2e22a5a commit 573bffa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def __init__(self, conn: sqlite3.Connection):
self.host = self._find_path(conn)
self.type = "SQLite"
self.code = (
"import sqlite3\n" f'conn = sqlite3.connect("{self.host}")\n' "%connection_show conn\n"
f'import sqlite3\nconn = sqlite3.connect("{self.host}")\n%connection_show conn\n'
)

def _find_path(self, conn: sqlite3.Connection):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ def _version_text(self, version: str) -> str:
# Add the module's __version__ to the heading
if len(version) > 0:
pkg_version = self.escape(version)
text = f'<div class="package-version">{"v"+pkg_version}</div>'
text = f'<div class="package-version">{"v" + pkg_version}</div>'
return text
else:
return ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ def verify_inspector(
assert inspector.equals(copied)

# Mutate the copied object, and check that the original object was not mutated.
assert (
mutate is not None
), "mutate function must be provided to test mutable objects"
assert mutate is not None, (
"mutate function must be provided to test mutable objects"
)
mutate(copied)
assert not inspector.equals(copied)
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,9 @@ def test_simple_django_collect():
if actual_list is not None:
actual_item = actual_list.pop(0)
assert all(item in actual_item for item in ("status", "cwd"))
assert (
actual_item.get("status") == "success"
), f"Status is not 'success', error is: {actual_item.get('error')}"
assert actual_item.get("status") == "success", (
f"Status is not 'success', error is: {actual_item.get('error')}"
)
assert actual_item.get("cwd") == os.fspath(data_path)
assert len(actual_item["tests"]["children"]) == 1
assert actual_item["tests"]["children"][0]["children"][0]["id_"] == os.fsdecode(
Expand Down

0 comments on commit 573bffa

Please sign in to comment.