Validation Messages: Add <strong> for missing_wheel and forbidden_filepaths #200
No reviewers
Labels
No Label
Priority
Critical
Priority
High
Priority
Low
Priority
Normal
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Type
Breaking
Type
Documentation
Type
Enhancement
Type
Feature
Type
Report
Type
Security
Type
Suggestion
Type
Testing
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: infrastructure/extensions-website#200
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "pr-error-messages-safe"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Note that in order to do this I need to sanitize the parameters separately from the error string.
@ -42,2 +45,2 @@
'missing_wheel': _('Python wheel missing: %(path)s'), # TODO <strong>%(path)s</strong>
'forbidden_filepaths': _('Archive contains forbidden files or directories: %(paths)s'), #TODO <strong>%(paths)s</strong>
'missing_wheel': _('Python wheel missing: <strong>%(path)s</strong>'),
'forbidden_filepaths': mark_safe(
this line and the line above look inconsistent: both of them have parameters, but only one is wrapped into
mark_safe
inside theerror_messages
declarationthis is confusing and doesn't establish a consistent pattern for further use: if it's possible it's better to make them the same
it seems that the code below (in
clean
) already takes care ofmark_safe
for cases when params are passed, so I would expect thatmark_safe
in this line is not needed. if this is not true, then the code structure is surprising - we should think how to make it more transparent.@ -151,3 +153,1 @@
params=code['params'],
)
)
error_message = str(self.error_messages[code['code']])
why is
str
cast needed here?Checkout
From your project repository, check out a new branch and test the changes.