Skip to content

Commit

Permalink
build(deps): bump ruff from 0.8.6 to 0.9.1 (#6860)
Browse files Browse the repository at this point in the history
* build(deps): bump ruff from 0.8.6 to 0.9.1

Bumps [ruff](/~https://github.com/astral-sh/ruff) from 0.8.6 to 0.9.1.
- [Release notes](/~https://github.com/astral-sh/ruff/releases)
- [Changelog](/~https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.8.6...0.9.1)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* reformat with new ruff

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Thorn <dthorn@mozilla.com>
  • Loading branch information
dependabot[bot] and relud authored Jan 14, 2025
1 parent 7bdd462 commit 10a4ed9
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 43 deletions.
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ python-decouple==3.8
PyYAML==6.0.2
requests==2.32.3
requests-mock==1.12.1
ruff==0.8.6
ruff==0.9.1
semver==3.0.2
sentry-sdk==2.17.0
Sphinx==8.1.3
Expand Down
38 changes: 19 additions & 19 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1220,25 +1220,25 @@ rsa==4.7.2 \
# via
# google-auth
# oauth2client
ruff==0.8.6 \
--hash=sha256:0509e8da430228236a18a677fcdb0c1f102dd26d5520f71f79b094963322ed25 \
--hash=sha256:0c000a471d519b3e6cfc9c6680025d923b4ca140ce3e4612d1a2ef58e11f11fe \
--hash=sha256:248b1fb3f739d01d528cc50b35ee9c4812aa58cc5935998e776bf8ed5b251e75 \
--hash=sha256:45a56f61b24682f6f6709636949ae8cc82ae229d8d773b4c76c09ec83964a95a \
--hash=sha256:496dd38a53aa173481a7d8866bcd6451bd934d06976a2505028a50583e001b76 \
--hash=sha256:52d587092ab8df308635762386f45f4638badb0866355b2b86760f6d3c076188 \
--hash=sha256:54799ca3d67ae5e0b7a7ac234baa657a9c1784b48ec954a094da7c206e0365b1 \
--hash=sha256:61323159cf21bc3897674e5adb27cd9e7700bab6b84de40d7be28c3d46dc67cf \
--hash=sha256:7ae4478b1471fc0c44ed52a6fb787e641a2ac58b1c1f91763bafbc2faddc5117 \
--hash=sha256:7d7fc2377a04b6e04ffe588caad613d0c460eb2ecba4c0ccbbfe2bc973cbc162 \
--hash=sha256:91a7ddb221779871cf226100e677b5ea38c2d54e9e2c8ed847450ebbdf99b32d \
--hash=sha256:9257aa841e9e8d9b727423086f0fa9a86b6b420fbf4bf9e1465d1250ce8e4d8d \
--hash=sha256:bc3c083c50390cf69e7e1b5a5a7303898966be973664ec0c4a4acea82c1d4315 \
--hash=sha256:dcad24b81b62650b0eb8814f576fc65cfee8674772a6e24c9b747911801eeaa5 \
--hash=sha256:defed167955d42c68b407e8f2e6f56ba52520e790aba4ca707a9c88619e580e3 \
--hash=sha256:e169ea1b9eae61c99b257dc83b9ee6c76f89042752cb2d83486a7d6e48e8f764 \
--hash=sha256:e88b8f6d901477c41559ba540beeb5a671e14cd29ebd5683903572f4b40a9807 \
--hash=sha256:f1d70bef3d16fdc897ee290d7d20da3cbe4e26349f62e8a0274e7a3f4ce7a905
ruff==0.9.1 \
--hash=sha256:186c2313de946f2c22bdf5954b8dd083e124bcfb685732cfb0beae0c47233d9b \
--hash=sha256:1cd76c7f9c679e6e8f2af8f778367dca82b95009bc7b1a85a47f1521ae524fa7 \
--hash=sha256:2f312c86fb40c5c02b44a29a750ee3b21002bd813b5233facdaf63a51d9a85e1 \
--hash=sha256:342a824b46ddbcdddd3abfbb332fa7fcaac5488bf18073e841236aadf4ad5c19 \
--hash=sha256:39d0174ccc45c439093971cc06ed3ac4dc545f5e8bdacf9f067adf879544d969 \
--hash=sha256:3cae39ba5d137054b0e5b472aee3b78a7c884e61591b100aeb544bcd1fc38d4f \
--hash=sha256:3f94942a3bb767675d9a051867c036655fe9f6c8a491539156a6f7e6b5f31831 \
--hash=sha256:46ebf5cc106cf7e7378ca3c28ce4293b61b449cd121b98699be727d40b79ba72 \
--hash=sha256:50c647ff96f4ba288db0ad87048257753733763b409b2faf2ea78b45c8bb7fcb \
--hash=sha256:5dc40a378a0e21b4cfe2b8a0f1812a6572fc7b230ef12cd9fac9161aa91d807f \
--hash=sha256:69572926c0f0c9912288915214ca9b2809525ea263603370b9e00bed2ba56dbd \
--hash=sha256:728d791b769cc28c05f12c280f99e8896932e9833fef1dd8756a6af2261fd1ab \
--hash=sha256:84330dda7abcc270e6055551aca93fdde1b0685fc4fd358f26410f9349cf1743 \
--hash=sha256:937267afce0c9170d6d29f01fcd1f4378172dec6760a9f4dface48cdabf9610a \
--hash=sha256:ae017c3a29bee341ba584f3823f805abbe5fe9cd97f87ed07ecbf533c4c88366 \
--hash=sha256:beb3298604540c884d8b282fe7625651378e1986c25df51dec5b2f60cafc31ce \
--hash=sha256:f0c8b149e9c7353cace7d698e1656ffcf1e36e50f8ea3b5d5f7f87ff9986a7ca \
--hash=sha256:fd2b25ecaf907d6458fa842675382c8597b3c746a2dde6717fe3415425df0c17
# via -r requirements.in
semver==3.0.2 \
--hash=sha256:6253adb39c70f6e51afed2fa7152bcd414c411286088fb4b9effb133885ab4cc \
Expand Down
2 changes: 1 addition & 1 deletion socorro/schemas/validate_processed_crash.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def validate_and_test(ctx, crashdir):
)
click.echo("")
for i, path in enumerate(processed_crash_list):
click.echo(f"Working on {path} ({i+1}/{total_processed_crash_list})...")
click.echo(f"Working on {path} ({i + 1}/{total_processed_crash_list})...")
processed_crash = json.loads((datapath / path).read_text())

# Log the keys
Expand Down
2 changes: 1 addition & 1 deletion socorro/schemas/validate_raw_crash.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def validate_and_test(ctx, crashdir):
click.echo("")
click.echo(f"Testing {total_raw_crash_list} raw crash files.")
for i, path in enumerate(raw_crash_list):
click.echo(f"Working on {path} ({i+1}/{total_raw_crash_list})...")
click.echo(f"Working on {path} ({i + 1}/{total_raw_crash_list})...")
raw_crash = json.loads((datapath / path).read_text())

# Log the keys
Expand Down
2 changes: 1 addition & 1 deletion socorro/signature/cmd_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ def main(argv=None):
fp.write("\n")

for i, rule in enumerate(rules):
li = f"{i+1}. "
li = f"{i + 1}. "
fp.write("%s%s\n" % (li, indent(get_doc(rule), " " * len(li))))
fp.write("\n")
5 changes: 2 additions & 3 deletions socorro/signature/tests/test_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,7 @@ def test_long_exception_description_with_line_number(self):
def test_no_description(self):
j = rules.JavaSignatureTool()
java_stack_trace = (
" SomeJavaException\n"
"at org.mozilla.lars.myInvention(larsFile.java:1234)"
" SomeJavaException\nat org.mozilla.lars.myInvention(larsFile.java:1234)"
)
sig, notes, debug_notes = j.generate(java_stack_trace, delimiter=": ")
e = "SomeJavaException: at org.mozilla.lars.myInvention(larsFile.java)"
Expand Down Expand Up @@ -1852,7 +1851,7 @@ def test_action(self):
assert sgr.action(crash_data, result) is True

# Verify the signature has been re-generated based on thread 0.
expected = "shutdownhang | MsgWaitForMultipleObjects | " "F_1152915508_____"
expected = "shutdownhang | MsgWaitForMultipleObjects | F_1152915508_____"
assert result.signature == expected
assert result.notes == []

Expand Down
2 changes: 1 addition & 1 deletion socorro/tests/lib/test_libjava.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def test_parenthesized_msg():
None,
"",
# Line without a tab in STACK stage
("Exception: msg\n" "\tat org.File.function(File.java:100)\n" "badline"),
("Exception: msg\n\tat org.File.function(File.java:100)\nbadline"),
],
)
def test_malformed(text):
Expand Down
4 changes: 2 additions & 2 deletions webapp/crashstats/authentication/tests/test_makesuperuser.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_nonexisting_user(self, db):
assert [g.name for g in neverheardof.groups.all()] == ["Hackers"]

@mock.patch(
"crashstats.authentication.management.commands.makesuperuser." "get_input",
"crashstats.authentication.management.commands.makesuperuser.get_input",
return_value="BOB@mozilla.com ",
)
def test_with_raw_input(self, mocked_raw_input, db):
Expand All @@ -97,7 +97,7 @@ def test_with_raw_input(self, mocked_raw_input, db):
assert [g.name for g in bob.groups.all()] == ["Hackers"]

@mock.patch(
"crashstats.authentication.management.commands.makesuperuser." "get_input",
"crashstats.authentication.management.commands.makesuperuser.get_input",
return_value="\n",
)
def test_with_raw_input_but_empty(self, mocked_raw_input, db):
Expand Down
4 changes: 2 additions & 2 deletions webapp/crashstats/crashstats/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ def inner(request, *args, **kwargs):
except ValueError:
return HttpResponseBadRequest("'days' not a number")
if days not in possible_days:
return HttpResponseBadRequest("'days' not a recognized " "number")
return HttpResponseBadRequest("'days' not a recognized number")
else:
if default is _marker:
return HttpResponseBadRequest("'days' missing from " "request")
return HttpResponseBadRequest("'days' missing from request")
days = default
kwargs.update({"days": days, "possible_days": possible_days})
return view(request, *args, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,7 @@ def scrape_candidates(self, product_name, archive_directory, major_version, stdo
version_links = [
link
for link in version_links
if
(
if (
# "63.0b7-candidates/" -> 63
int(link["text"].split(".")[0]) >= major_version_minus_4
or "esr" in link["text"]
Expand Down
8 changes: 2 additions & 6 deletions webapp/crashstats/crashstats/tests/test_jinja_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,18 +414,14 @@ def test_show_filesize(self):
html = show_filesize(10000)
assert isinstance(html, SafeText)
expected = (
"10,000 bytes "
'<span class="humanized" title="10,000 bytes">'
"(10 KB)</span>"
'10,000 bytes <span class="humanized" title="10,000 bytes">(10 KB)</span>'
)
assert html == expected

html = show_filesize("10000")
assert isinstance(html, SafeText)
expected = (
"10,000 bytes "
'<span class="humanized" title="10,000 bytes">'
"(10 KB)</span>"
'10,000 bytes <span class="humanized" title="10,000 bytes">(10 KB)</span>'
)
assert html == expected

Expand Down
2 changes: 1 addition & 1 deletion webapp/crashstats/crashstats/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def ratelimit_blocked(request, exception):

def robots_txt(request):
return http.HttpResponse(
"User-agent: *\n" "%s: /" % ("Allow" if settings.ENGAGE_ROBOTS else "Disallow"),
"User-agent: *\n%s: /" % ("Allow" if settings.ENGAGE_ROBOTS else "Disallow"),
content_type="text/plain",
)

Expand Down
4 changes: 1 addition & 3 deletions webapp/crashstats/signature/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,7 @@ def signature_graphs(request, params, field):
# Make sure the field we want to aggregate on is allowed.
if field not in allowed_fields:
return http.HttpResponseBadRequest(
"<ul><li>"
'You are not allowed to group by the "%s" field'
"</li></ul>" % field
'<ul><li>You are not allowed to group by the "%s" field</li></ul>' % field
)

current_query = request.GET.copy()
Expand Down

0 comments on commit 10a4ed9

Please sign in to comment.