-
Notifications
You must be signed in to change notification settings - Fork 13
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
is_url_for decorator. Fixes #77. #79
Conversation
else: | ||
kwargs[param] = getattr(self, attr) | ||
|
||
return url_for(endpoint, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this could use a more obvious name to indicate that it's calling flask's url_for
? At first blush, it seemed like a recursive call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment above this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, as a reader I would find flask_url_for
clearer than a comment, but this is perhaps a subjective detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, but our convention is to rename only when there's a conflict. We're not defining a url_for
at the module level, and we don't want to cause conflict if some thing else in this module requires that function in future. A comment has less collateral impact.
In |
No description provided.