Skip to content

W1203 with F-strings #2354

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

Closed
pzelnip opened this issue Jul 27, 2018 · 8 comments
Closed

W1203 with F-strings #2354

pzelnip opened this issue Jul 27, 2018 · 8 comments

Comments

@pzelnip
Copy link
Contributor

pzelnip commented Jul 27, 2018

Question

The logging-fstring-interpolation (W1203) warning reads:

  | Use % formatting in logging functions and pass the % parameters as arguments 
Used when a logging statement has a call form of "logging.<logging method>
(format_string.format(format_args...))". Such calls should use % formatting instead, 
but leave interpolation to the logging function by passing the parameters as arguments.
This message is emitted if f-string was used, and it can be disabled if you like.

It's not clear to me from that paragraph if its recommended to still use the formatting operator in logging statements, or if f-strings should be used. My understanding is the original intent of W1203 was to prefer the formatting operator over calls to format() as then the string interpolation is done lazily. I'm guessing the same is true with f-strings correct? Ie F-strings would not be evaluated lazily, so the same reasons for preferring the formatting operator over .format() with log statements apply, and as such the same warning is emitted when f-strings are used with log statements.

Is that correct?

@PCManticore
Copy link
Contributor

Hi, thanks for reporting an issue. That's right, this message is emitted when f-strings are used with logging methods, and it recommends to switch to % instead.

@charlescbeebe
Copy link

Is there a PEP that justifies this, or perhaps a thread in which 2+ core Python devs agree with this stance? If not, what makes this an objectively good idea?

@neitsa
Copy link

neitsa commented Aug 20, 2018

@charlescbeebe If I'm not mistaken % formatted strings are not "built" (formatted) if the logger level is below the one configured for the handlers for that logger (e.g. your logger level is set to logging.INFO and you have a call to logger.debug() then nothing is formatted). On the other hand f-strings are always built...

@pzelnip
Copy link
Contributor Author

pzelnip commented Aug 21, 2018

@neitsa you are correct, if the loglevel is such that the statement does not get emitted, then using % formatting will save you the cost of string interpolation.

However, in practice because f-strings are so performant even when doing the string interpolation, the savings in time is extremely negligible (see the timeit results at #2395).

Furthermore, if the interpolation is happening (ex if log level is set to debug and you're doing a logging.info()), then it's very likely that f-strings are actually faster than % formatting. For some discussion of why, see https://cito.github.io/blog/f-strings/ (under "Performance considerations") and https://medium.com/@augustogoulart/python-f-strings-fun-strings-fast-strings-beeae4ddd1a

So if you follow the Pylint suggestion and don't use f-strings you're making your code slower in some places and maybe slightly faster in others (depending on loglevel and how many logging statements you're suppressing by loglevel). At the end of the day though, unless you're logging a lot of calls at a loglevel that's ignored (like on the order of millions), then the performance difference is going to be not-noticeable regardless of which you choose.

Additionally, putting the performance discussion aside, f-strings have many other advantages over % formatting from a readability and/or flexibility perspective.

nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Aug 9, 2020
Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Oct 21, 2020
Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 3, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 6, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
umbernhard pushed a commit to votingworks/arlo that referenced this issue Nov 9, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 9, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 9, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 10, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 10, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 12, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 12, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 12, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 13, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 16, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 20, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 24, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
nealmcb added a commit to gwexploratoryaudits/arlo that referenced this issue Nov 25, 2020
feat: add athena_sample_sizes option

Add an athena_sample_sizes() shim, to call Athena using
the same call signature as bravo_sample_sizes()

Calculate Athena p-values

Define get_athena_test_statistics() shim
patterned after bravo.get_test_statistics()

Still following earlier integration work based on ab525ad from 2020-05-05

Move shim to new audit_math location

Based on Arlo changes in the meantime.

Dirty patch to bravo.py for using athena

Allow user to choose audit_math implementation at startup.

The default is now to use Athena, but the $ARLO_ALGORITHM environmental
variable can be used to select an algorithm at run time. E.g.:

    ARLO_ALGORITHM=bravo ./run-dev.sh

N.B.: to avoid have to add too much other logic before
we decide on the best way to integrate this, we simply
conditionally replace bravo.bravo_sample_sizes with athena_sample_sizes:

if ALGORITHM == "athena":
    bravo_sample_sizes = athena_sample_sizes

Also catch up with API updates in athena repo.

Switch to minerva, adapt to Athena api changes

FIXME: bravo tests still broken
Need to check the minerva test results.

Temp README changes; logging setup; more tests

Temp: run black, note issues

Resolve lint, typing errors; fstring logging

Turned off logging-fstring-interpolation in .pylintrc.
I think the possible tiny performance penalty is offset by the readability gains,
as noted at

 pylint-dev/pylint#2354 (comment)

Clarify README and auth0.md; fix .pylintrc format

Add athena from git to Pipfile

Note changes in Pipfile.lock - not sure if you want the rest
of the packages to be updated, or to have specific version numbers.

Add logging during startup

Fix typo, get node, cli buildpacks to build

Specify Heroku version python-3.7.8 in runtime.txt

Fix Pipfile.lock syntax

Clean up some logging
lyz-code added a commit to lyz-code/cookiecutter-python-project that referenced this issue Dec 14, 2020
The rule is deprecated in favor of using f-strings

pylint-dev/pylint#2354
pevogam added a commit to pevogam/avocado that referenced this issue Jun 6, 2022
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Jun 6, 2022
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Jun 6, 2022
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Jun 7, 2022
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
diedpigs added a commit to diedpigs/rabbitmq_agents that referenced this issue Jun 8, 2022
According to the comment here:
pylint-dev/pylint#2354 (comment)

I think the f-string could be used in logging.
pevogam added a commit to pevogam/avocado that referenced this issue Jun 23, 2022
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Jun 27, 2022
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Jun 28, 2022
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Jul 7, 2022
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Jul 18, 2022
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Aug 16, 2022
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Aug 16, 2022
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Jan 31, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Feb 7, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Feb 16, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Mar 2, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Mar 2, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Mar 7, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Mar 13, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Mar 23, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Mar 23, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Mar 23, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Apr 6, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue Apr 15, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
clebergnu pushed a commit to clebergnu/avocado that referenced this issue Apr 27, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue May 2, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
pevogam added a commit to pevogam/avocado that referenced this issue May 2, 2023
The arguments on why we should do this are well-explained and fully
provided in:

pylint-dev/pylint#2354 (comment)

Signed-off-by: Plamen Dimitrov <[email protected]>
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

No branches or pull requests

7 participants