Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 99581a7

Browse files
authored
Reformat with ruff>=0.9 (#470)
1 parent d4ee906 commit 99581a7

File tree

8 files changed

+40
-40
lines changed

8 files changed

+40
-40
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ dev-dependencies = [
5656
"pytest-mock>=1.13.0",
5757
"pytest>=8.1.1",
5858
"respx>=0.20.2",
59-
"ruff>=0.7.3",
59+
"ruff>=0.9.0",
6060
"types-mock>=5.1.0.20240425",
6161
# NOTE: some weird interaction between existing `vcrpy` snapshots and the way
6262
# `oauth2` / `minio` deal with requests forces us to downgrade `urllib3`:

shared/django_apps/utils/model_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ def __init__(
7575

7676
def __set_name__(self, owner, name):
7777
# Validate that the owner class has the methods we need
78-
assert issubclass(
79-
owner, ArchiveFieldInterface
80-
), "Missing some required methods to use AchiveField"
78+
assert issubclass(owner, ArchiveFieldInterface), (
79+
"Missing some required methods to use AchiveField"
80+
)
8181
self.public_name = name
8282
self.db_field_name = "_" + name
8383
self.archive_field_name = "_" + name + "_storage_path"

shared/encryption/token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def encode_token(token: OauthConsumerToken) -> str:
1010
string_to_save = (
1111
token["key"]
1212
+ f":{token['secret'] if token.get('secret') else ' '}"
13-
+ (f':{token["refresh_token"]}' if token.get("refresh_token") else "")
13+
+ (f":{token['refresh_token']}" if token.get("refresh_token") else "")
1414
)
1515
return string_to_save
1616

shared/license/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ def startup_license_logging():
8686
current_license = get_current_license()
8787
is_valid = current_license.is_valid
8888
statements_to_print.append(
89-
f" License is {"valid" if is_valid else "INVALID"}"
89+
f" License is {'valid' if is_valid else 'INVALID'}"
9090
)
9191

9292
if current_license.message:
9393
statements_to_print.append(f" Warning: {current_license.message}")
9494

9595
exp_date = current_license.expires
9696
statements_to_print.append(
97-
f" License expires {datetime.strftime(exp_date, "%Y-%m-%d %H:%M:%S") if exp_date else "NOT FOUND"} <=="
97+
f" License expires {datetime.strftime(exp_date, '%Y-%m-%d %H:%M:%S') if exp_date else 'NOT FOUND'} <=="
9898
)
9999
statements_to_print.append("") # padding
100100

tests/integration/test_gitlab.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ async def test_get_commit_diff(self, valid_handler, codecov_vcr):
287287
"-> This repo is used for CI "
288288
"Testing. Enjoy this gif as a "
289289
"reward!",
290-
"+> This repo is used for CI " "Testing",
290+
"+> This repo is used for CI Testing",
291291
"+",
292292
"+",
293293
"+| [https://codecov.io/][1] "
@@ -301,10 +301,10 @@ async def test_get_commit_diff(self, valid_handler, codecov_vcr):
301301
"+",
302302
"+",
303303
"+[1]: https://codecov.io/",
304-
"+[2]: " "https://twitter.com/codecov",
305-
"+[3]: " "mailto:[email protected]",
304+
"+[2]: https://twitter.com/codecov",
305+
"+[3]: mailto:[email protected]",
306306
" ",
307-
"-![i can do " "that](http://gph.is/17cvPc4)",
307+
"-![i can do that](http://gph.is/17cvPc4)",
308308
],
309309
}
310310
],

tests/unit/bundle_analysis/test_bundle_analysis.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -848,18 +848,18 @@ def load_and_test_report(
848848
report.ingest(report_path)
849849
bundle_report = report.bundle_report("sample")
850850
asset_reports = list(bundle_report.asset_reports())
851-
assert (
852-
bundle_report.total_size() == expected_total_size
853-
), f"Version {version}: Total size mismatch"
851+
assert bundle_report.total_size() == expected_total_size, (
852+
f"Version {version}: Total size mismatch"
853+
)
854854

855855
total_js_size = sum(
856856
asset.size
857857
for asset in asset_reports
858858
if asset.asset_type == AssetType.JAVASCRIPT
859859
)
860-
assert (
861-
total_js_size == expected_js_size
862-
), f"Version {version}: JS size mismatch"
860+
assert total_js_size == expected_js_size, (
861+
f"Version {version}: JS size mismatch"
862+
)
863863
finally:
864864
report.cleanup()
865865

tests/unit/test_license.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def test_startup_license_logging_invalid(
186186
"",
187187
"==> Checking License",
188188
" License is INVALID",
189-
f" Warning: {LICENSE_ERRORS_MESSAGES["no-license"]}",
189+
f" Warning: {LICENSE_ERRORS_MESSAGES['no-license']}",
190190
" License expires NOT FOUND <==",
191191
"",
192192
]

uv.lock

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)