-
Notifications
You must be signed in to change notification settings - Fork 192
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
Booleans and ENV vars #3208
Comments
karlcow
added a commit
to karlcow/webcompat.com
that referenced
this issue
Feb 21, 2020
karlcow
added a commit
to karlcow/webcompat.com
that referenced
this issue
Feb 21, 2020
karlcow
added a commit
to karlcow/webcompat.com
that referenced
this issue
Feb 21, 2020
rik
added a commit
to rik/webcompat.com
that referenced
this issue
Feb 21, 2020
The second argument for `get` on mapping objects is the default value when the key is not found. See https://docs.python.org/3/library/stdtypes.html#dict.get. The default value we use is a value accepted by `strtobool` so we can move the conversion on the same line.
rik
added a commit
to rik/webcompat.com
that referenced
this issue
Feb 21, 2020
The second argument for `get` on mapping objects is the default value when the key is not found. See https://docs.python.org/3/library/stdtypes.html#dict.get. The default value we use is a value accepted by `strtobool` so we can move the conversion on the same line.
rik
added a commit
to rik/webcompat.com
that referenced
this issue
Feb 21, 2020
The second argument for `get` on mapping objects is the default value when the key is not found. See https://docs.python.org/3/library/stdtypes.html#dict.get. The default value we use is a value accepted by `strtobool` so we can move the conversion on the same line.
karlcow
added a commit
that referenced
this issue
Feb 27, 2020
Issue #3208 - Use more Pythonic get default value
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a follow up on #3185 after reading @karlcow's week notes and a discussion on IRC about that.
Me recommendation was to try to cast the env vars to booleans as soon as possible (there are a couple of ways to achieve that) and not compare the result here and there against
'ON'
or'OFF'
, especially in templates but that's another topic./cc @rik
The text was updated successfully, but these errors were encountered: