Closed singingwolfboy closed 3 years ago
Merging #360 (e33e9a9) into main (db3c2fc) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## main #360 +/- ##
=======================================
Coverage 93.68% 93.68%
=======================================
Files 34 34
Lines 1045 1045
=======================================
Hits 979 979
Misses 66 66
Impacted Files | Coverage Δ | |
---|---|---|
flask_dance/consumer/base.py | 89.87% <ø> (ø) |
|
flask_dance/consumer/oauth1.py | 68.60% <ø> (ø) |
|
flask_dance/consumer/oauth2.py | 92.23% <ø> (ø) |
|
flask_dance/contrib/atlassian.py | 100.00% <ø> (ø) |
|
flask_dance/contrib/authentiq.py | 100.00% <ø> (ø) |
|
flask_dance/contrib/azure.py | 100.00% <ø> (ø) |
|
flask_dance/contrib/digitalocean.py | 100.00% <ø> (ø) |
|
flask_dance/contrib/discord.py | 100.00% <ø> (ø) |
|
flask_dance/contrib/dropbox.py | 100.00% <ø> (ø) |
|
flask_dance/contrib/facebook.py | 100.00% <ø> (ø) |
|
... and 16 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update db3c2fc...e33e9a9. Read the comment docs.
I like this. I've always found the behaviour where positional args can fill in keyword args confusing. It's almost always an error, and I like the self-documenting nature of keyword args.
One question though, in your changeset you're keeping client_id
and client_secret
as old-style arguments, kwarg but could be filled by positional. Why is that?
One question though, in your changeset you're keeping
client_id
andclient_secret
as old-style arguments, kwarg but could be filled by positional. Why is that?
I did that because client_id
and client_secret
are necessary for Flask-Dance to work, and so they are almost like positional, required arguments. I intentionally kept them as the first two arguments in every pre-set configuration, for that reason. The only time that it's OK to not specify those arguments is when you are loading those values in the flask.config
object instead, which is why they are not actually positional, required arguments. You'll also notice that the automated tests use this pattern a fair amount, specifying the client_id
and client_secret
as positional arguments. I want that to be a supported pattern, since it seems fairly clear to me.
Does that make sense, and do you agree?
Yup, that makes sense!
See https://www.python.org/dev/peps/pep-3102/. I intended to use this feature when I first created this library, but Python 2.7 compatibility prevented me from doing so, and I forgot about it until recently. Since this has the potential of causing backwards-incompatibility, we will need to bump the major version number.
@daenney, do you have any thoughts about this change?