From bfbf081ef225509c53161e5f31aa2f75750a6c3b Mon Sep 17 00:00:00 2001 From: theoniko Date: Wed, 16 Sep 2026 07:01:05 +0300 Subject: [PATCH] Replace Field(default=None) with regular default value assignment --- .../hackbot_agents/autowebcompat_repro/result.py | 3 +-- libs/hackbot-runtime/hackbot_runtime/actions/bugzilla.py | 6 ------ libs/hackbot-runtime/hackbot_runtime/actions/phabricator.py | 2 -- libs/hackbot-runtime/hackbot_runtime/actions/try_server.py | 5 ----- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/agents/autowebcompat-repro/hackbot_agents/autowebcompat_repro/result.py b/agents/autowebcompat-repro/hackbot_agents/autowebcompat_repro/result.py index 81e027af0b..2f1be324d3 100644 --- a/agents/autowebcompat-repro/hackbot_agents/autowebcompat_repro/result.py +++ b/agents/autowebcompat-repro/hackbot_agents/autowebcompat_repro/result.py @@ -75,14 +75,13 @@ class ReproductionResult(BaseModel): confirmed_by_script: Annotated[ bool, Field( - default=False, description=( "true if a Puppeteer script demonstrated the difference for this " "Firefox build, false if you could not get one to pass or did not " "run one." ), ), - ] + ] = False reproduced: Annotated[ bool, diff --git a/libs/hackbot-runtime/hackbot_runtime/actions/bugzilla.py b/libs/hackbot-runtime/hackbot_runtime/actions/bugzilla.py index daa36bf725..d507d8d7c4 100644 --- a/libs/hackbot-runtime/hackbot_runtime/actions/bugzilla.py +++ b/libs/hackbot-runtime/hackbot_runtime/actions/bugzilla.py @@ -76,7 +76,6 @@ async def add_comment( is_private: Annotated[ bool, Field( - default=False, description="Mark the comment private (security group only).", ), ] = False, @@ -115,14 +114,12 @@ async def add_attachment( summary: Annotated[ str | None, Field( - default=None, description="Short description of the attachment. Defaults to the filename.", ), ] = None, content_type: Annotated[ str | None, Field( - default=None, description=( "MIME type. Guessed from extension if omitted. Ignored " "when is_patch=true." @@ -132,7 +129,6 @@ async def add_attachment( is_patch: Annotated[ bool, Field( - default=False, description=( "Mark as a patch (Bugzilla forces text/plain and enables diff view)." ), @@ -141,7 +137,6 @@ async def add_attachment( comment: Annotated[ str | None, Field( - default=None, description="Optional comment to record alongside the attachment.", ), ] = None, @@ -200,7 +195,6 @@ async def create_bug( extra: Annotated[ dict[str, Any] | None, Field( - default=None, description=( "Optional additional fields accepted by Bugzilla's POST /bug " "endpoint (severity, priority, keywords, whiteboard, blocks, " diff --git a/libs/hackbot-runtime/hackbot_runtime/actions/phabricator.py b/libs/hackbot-runtime/hackbot_runtime/actions/phabricator.py index 4844c2039a..9d7b162f53 100644 --- a/libs/hackbot-runtime/hackbot_runtime/actions/phabricator.py +++ b/libs/hackbot-runtime/hackbot_runtime/actions/phabricator.py @@ -70,7 +70,6 @@ async def submit_patch( summary: Annotated[ str | None, Field( - default=None, description=( "Revision summary/description. Keep test and verification details " "in test_plan instead." @@ -80,7 +79,6 @@ async def submit_patch( ref: Annotated[ str | None, Field( - default=None, description=( "Optional label for this action so a later action (e.g. a " "bugzilla.add_comment in the same run) can reference its " diff --git a/libs/hackbot-runtime/hackbot_runtime/actions/try_server.py b/libs/hackbot-runtime/hackbot_runtime/actions/try_server.py index e232c15779..be0ff3116f 100644 --- a/libs/hackbot-runtime/hackbot_runtime/actions/try_server.py +++ b/libs/hackbot-runtime/hackbot_runtime/actions/try_server.py @@ -58,7 +58,6 @@ async def push( tasks: Annotated[ list[str] | None, Field( - default=None, description=( "Treeherder task labels, e.g. ['build-linux64/opt']. Only tasks " "that exercise your change; each costs machine time. Not with " @@ -69,7 +68,6 @@ async def push( auto: Annotated[ bool, Field( - default=False, description=( "Let CI pick the tasks for the files you changed (`mach try " "auto`). Prefer this when unsure. Not with `tasks`." @@ -79,7 +77,6 @@ async def push( tests: Annotated[ dict[str, list[str]] | None, Field( - default=None, description=( "Narrow the selection to specific tests: {suite: [repo-relative " "paths]}, e.g. {'mochitest-browser-chrome': " @@ -92,7 +89,6 @@ async def push( title: Annotated[ str | None, Field( - default=None, description=( "One-line commit message shown on Treeherder, e.g. 'Bug 123 - " "verify the fix on Linux'." @@ -102,7 +98,6 @@ async def push( ref: Annotated[ str | None, Field( - default=None, description=( "Label for this action so a later one can use " "{{actions..url}} to link this push."