authomatic icon indicating copy to clipboard operation
authomatic copied to clipboard

SyntaxWarning: "is" with a literal : warning issued by python

Open mahdialibi opened this issue 3 years ago • 1 comments

This is not an issue but it is a warning when using automatic with python 3.8+ and authomatic 1.0.0 the warning was added in python 3.8 https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-python-behavior

Error

Authomatic_1_0_0/authomatic/core.py:1720: SyntaxWarning: "is" with a literal. Did you mean "=="? if ProviderClass.supports_jsonp and method is 'GET':

mahdialibi avatar Jun 03 '22 19:06 mahdialibi

This is definitely a bug in the code here: https://github.com/authomatic/authomatic/blob/676382221a3818c4ccaea9f359e1dd4e2df25839/authomatic/core.py#L1720

should be

 if ProviderClass.supports_jsonp and method == 'GET': 

touilleMan avatar Oct 21 '22 16:10 touilleMan