-
Notifications
You must be signed in to change notification settings - Fork 29
Pre-release improvements #28
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
I migrated everything to use |
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.
Django 4.2
- ✅ url has been replaced with re_path
- ✅ ugettext_lazy has been replaced with gettext_lazy
_request
Line 73
could raise an AttributeError
if self
is undefined. See: AttributeError
I'd either pass a default, wrap an try/except or add a docblock to the function body that an error could be raised.
html = Dropdown(
label=_("Actions"),
items=items,
request=getattr(self, '_request')
).render()
_request is obviously defined in the order the functions are called. The order of the functions being called should not determine if the code works or not. A future developer might update another thing and change the order of the functions call, causing an error he/she does not understand.
Quotes
I would opt for either single or double quotes. I'd not mix it. Personally I prefer single ones for string constants. Doubles to escape.
"In Python, single-quoted strings and double-quoted strings are the same. This PEP does not make a recommendation for this. Pick a rule and stick to it."
@amaddio Does this now look good to go to you? |
@blag Looking great to me. |
I'll be releasing a new version from
master
once this is merged.Changes:
setup.py