Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RepoURLModifier is more IDE- and user-friendly #760

Merged
merged 1 commit into from Jan 30, 2016

Conversation

seandst
Copy link
Contributor

@seandst seandst commented Jan 7, 2016

In addition to explicitly declaring the kwargs to __init__ and
__call__, I took a step back and considered if there was any value
to storing path_append and ensure_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

In addition to explicitly declaring the kwargs to `__init__` and
`__call__`, I took a step back and considered if there was any value
to storing `path_append` and `ensure_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 pulp#1442
:ivar conf: URL modifier persistent configuration, populated from optional keyword
arguments (see :py:meth:`RepoURLModifier.__call__` for allowed options).
:type conf: dict
Initialize the URL modifier with defaults, populated from optional keyword arguments

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/, populated from optional keyword arguments// ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I struggled a bit with wording. "from an optional keyword argument", "with a default query auth token", just end the line at "with defaults", etc. I think this is still my preferred wording.

seandst added a commit that referenced this pull request Jan 30, 2016
RepoURLModifier is more IDE- and user-friendly
@seandst seandst merged commit 26bcd1b into pulp:master Jan 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants