Skip to content

Commit

Permalink
Convert directory fbcode/kernel to use the Ruff Formatter
Browse files Browse the repository at this point in the history
Summary:
Converts the directory specified to use the Ruff formatter in pyfmt

ruff_dog

If this diff causes merge conflicts when rebasing, please run
`hg status -n -0 --change . -I '**/*.{py,pyi}' | xargs -0 arc pyfmt`
on your diff, and amend any changes before rebasing onto latest.
That should help reduce or eliminate any merge conflicts.

allow-large-files

Reviewed By: amyreese

Differential Revision: D66248116

fbshipit-source-id: 7c3d73bd42cd040f0d86db02901694b8707494fa
  • Loading branch information
Thomas Polasek authored and facebook-github-bot committed Nov 20, 2024
1 parent 675bf47 commit cfb1bda
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
16 changes: 4 additions & 12 deletions kernel_patches_daemon/branch_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@
UPSTREAM_REMOTE_NAME = "upstream"


EMAIL_TEMPLATE_BASE: Final[
str
] = """\
EMAIL_TEMPLATE_BASE: Final[str] = """\
Dear patch submitter,
CI has tested the following submission:
Expand All @@ -103,26 +101,20 @@
kernel-ci@meta.com.
"""

EMAIL_TEMPLATE_MERGE_CONFLICT_BODY: Final[
str
] = """\
EMAIL_TEMPLATE_MERGE_CONFLICT_BODY: Final[str] = """\
PR: {github_pr_url}
Please rebase your submission onto the most recent upstream change and resubmit
the patch to get it tested again.
"""

EMAIL_TEMPLATE_SUCCESS_BODY: Final[
str
] = """\
EMAIL_TEMPLATE_SUCCESS_BODY: Final[str] = """\
Matrix: {github_actions_url}
No further action is necessary on your part.
"""

EMAIL_TEMPLATE_FAILURE_BODY: Final[
str
] = """\
EMAIL_TEMPLATE_FAILURE_BODY: Final[str] = """\
Matrix: {github_actions_url}
{inline_logs}\
Expand Down
1 change: 0 additions & 1 deletion kernel_patches_daemon/github_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def __init__(
app_auth: Optional[Auth.AppInstallationAuth] = None,
http_retries: Optional[int] = None,
) -> None:

assert bool(github_oauth_token) ^ bool(
app_auth
), "Only one of github_oauth_token or app_auth can be set"
Expand Down
1 change: 0 additions & 1 deletion kernel_patches_daemon/patchwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ async def is_expired(self) -> bool:

@cached(cache=TTLCache(maxsize=1, ttl=120))
async def get_patch_binary_content(self) -> bytes:

content = await self.pw_client.get_blob(self.mbox)
logger.debug(
f"Received patch mbox for series {self.id}, size: {len(content)} bytes"
Expand Down

0 comments on commit cfb1bda

Please sign in to comment.