Actions
Issue #1442
closedMake RepoURLModifier more IDE-friendly
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Master
Platform Release:
2.8.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Quarter:
Description
(and also more developer-friendly)
Currently, in pulp_rpm[0], the RepoURLModifier stashes the passed-in args in a dict as the conf
instance attr. This is an artifact from earlier incarnations of that class, and serves no practical purpose. Instead of adding those to a dict, they should be normal instance attributes.
The conf dict keys are used for validation in __call__
, but I think it's probably reasonable to get rid of the **kwargs
usage in that method to support more IDE- and developer-friendliness; it looks less DRY, but ends up being more explicit and readable, which is probably an overall win.
Updated by semyers over 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to semyers
Added by semyers over 8 years ago
Updated by semyers over 8 years ago
- Status changed from ASSIGNED to POST
- Version set to Master
Updated by semyers about 8 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset 88881cbfe3ae19c5cf35f4469f5436c78bb341d5.
Updated by dkliban@redhat.com about 8 years ago
- Status changed from MODIFIED to 5
Updated by dkliban@redhat.com about 8 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Actions
RepoURLModifier is more IDE- and user-friendly
In addition to explicitly declaring the kwargs to
__init__
and__call__
, I took a step back and considered if there was any value to storingpath_append
andensure_trailing_slash
as stateful defaults. Based on the current usage and my best judgement, there was no value in that, and in fact having the same signature for both methods only made things more confusing. Hopefully the stateful nature of of this class is more clear, so in addition to being IDE-friendly, it's much easier for humans to grok.https://pulp.plan.io/issues/1442 fixes #1442