Minimal changes introduced by Ruff formatter after double quotes enforcement

This commit is contained in:
Yoann Schneider 2024-01-25 11:33:57 +01:00 коммит произвёл Sebastian Hengst
Родитель cfb19a5ef8
Коммит 25bb741fe7
6 изменённых файлов: 10 добавлений и 22 удалений

Просмотреть файл

@ -17,9 +17,5 @@ repos:
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
language_version: python3.9
- id: ruff-format
exclude: ^treeherder/.*/migrations

Просмотреть файл

@ -21,11 +21,6 @@ mkdocs = { version = "==1.4.2", optional = true }
mkdocs-material = { version = "==8.5.11", optional = true }
mdx_truly_sane_lists = { version = "1.3", optional = true }
[tool.black]
line-length = 100
target-version = ['py39']
include = '\.pyi?$'
[tool.ruff]
# Same as Black.
line-length = 100
@ -46,9 +41,12 @@ select = [
ignore = [
# E501: line too long
"E501"
"E501",
]
# Also lint/format pyi files
extend-include = ["*.pyi"]
[tool.ruff.per-file-ignores]
# Ignore `module-import-not-at-top-of-file` rule of `pycodestyle`
"treeherder/model/models.py" = ["E402"]

Просмотреть файл

@ -43,7 +43,7 @@ def test_email_is_still_sent_if_context_is_too_corrupt_to_be_actionable(
record_ready_for_processing,
sherlock_settings,
broken_context_str,
tc_notify_mock
tc_notify_mock,
# Note: parametrizes the test
):
record_ready_for_processing.context = broken_context_str

Просмотреть файл

@ -41,9 +41,7 @@ class Command(BaseCommand):
metavar="USE CASE",
help="""Rename "old" Raptor tp6 subtests, by pointing perf alerts & datum to new signatures.
Cannot be used in conjunction with --from/--to arguments.
Available use cases: {}""".format(
",".join(USE_CASES)
),
Available use cases: {}""".format(",".join(USE_CASES)),
)
parser.add_argument(
"--keep-leftovers",

Просмотреть файл

@ -535,8 +535,7 @@ class PerformanceAlert(models.Model):
# or absence of a related summary
if self.related_summary and self.status not in self.RELATIONAL_STATUS_IDS:
raise ValidationError(
"Related summary set but status not in "
"'{}'!".format(
"Related summary set but status not in " "'{}'!".format(
", ".join(
[
STATUS[1]
@ -548,8 +547,7 @@ class PerformanceAlert(models.Model):
)
if not self.related_summary and self.status not in self.UNRELATIONAL_STATUS_IDS:
raise ValidationError(
"Related summary not set but status not in "
"'{}'!".format(
"Related summary not set but status not in " "'{}'!".format(
", ".join(
[
STATUS[1]

Просмотреть файл

@ -751,9 +751,7 @@ class PerformanceSummary(generics.ListAPIView):
"push_timestamp",
"push__revision",
"performancedatumreplicate__value",
).order_by(
"push_timestamp", "push_id", "job_id"
):
).order_by("push_timestamp", "push_id", "job_id"):
if replicate_value is not None:
item["data"].append(
{