andrewmusselman commented on code in PR #309:
URL:
https://github.com/apache/tooling-trusted-releases/pull/309#discussion_r2540868876
##########
atr/shared/distribution.py:
##########
@@ -36,55 +35,64 @@
type Phase = Literal["COMPOSE", "VOTE", "FINISH"]
-class DeleteForm(forms.Typed):
- release_name = forms.hidden()
- platform = forms.hidden()
- owner_namespace = forms.hidden()
- package = forms.hidden()
- version = forms.hidden()
- submit = forms.submit("Delete")
+class DeleteForm(form.Form):
+ release_name: str = form.label("Release name", widget=form.Widget.HIDDEN)
+ platform: str = form.label("Platform", widget=form.Widget.HIDDEN)
+ owner_namespace: str = form.label("Owner namespace",
widget=form.Widget.HIDDEN)
+ package: str = form.label("Package", widget=form.Widget.HIDDEN)
+ version: str = form.label("Version", widget=form.Widget.HIDDEN)
-class DistributeForm(forms.Typed):
- platform = forms.select("Platform", choices=sql.DistributionPlatform)
- owner_namespace = forms.optional(
- "Owner or Namespace",
- placeholder="E.g. com.example or scope or library",
- description="Who owns or names the package (Maven groupId, npm @scope,
"
- "Docker namespace, GitHub owner, ArtifactHub repo). Leave blank if not
used.",
+class DistributeForm(form.Form):
+ platform: sql.DistributionPlatform = form.label(description="Platform")
+ owner_namespace: str | None = form.label(
+ description="Owner or Namespace",
+ documentation=(
+ "Who owns or names the package (Maven groupId, npm @scope, Docker
namespace, "
+ "GitHub owner, ArtifactHub repo). Leave blank if not used."
+ ),
+ widget=form.Widget.TEXT,
+ )
+ package: str = form.label("Package", widget=form.Widget.TEXT)
+ version: str = form.label("Version", widget=form.Widget.TEXT)
+ details: bool = form.label(
+ description="Include details",
Review Comment:
I only added those because there was a line that linted as too long, I made
it a multi-line string instead
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]