5757 chardet_version = None
5858
5959
60- def check_compatibility (urllib3_version , chardet_version , charset_normalizer_version ):
60+ def check_compatibility (
61+ urllib3_version , chardet_version , charset_normalizer_version
62+ ):
6163 urllib3_version = urllib3_version .split ("." )
62- assert urllib3_version != ["dev" ] # Verify urllib3 isn't installed from git.
64+ assert urllib3_version != [
65+ "dev"
66+ ] # Verify urllib3 isn't installed from git.
6367
6468 # Sometimes, urllib3 only reports its version as 16.1.
6569 if len (urllib3_version ) == 2 :
@@ -85,7 +89,9 @@ def check_compatibility(urllib3_version, chardet_version, charset_normalizer_ver
8589 # charset_normalizer >= 2.0.0 < 3.0.0
8690 assert (2 , 0 , 0 ) <= (major , minor , patch ) < (3 , 0 , 0 )
8791 else :
88- raise Exception ("You need either charset_normalizer or chardet installed" )
92+ raise Exception (
93+ "You need either charset_normalizer or chardet installed"
94+ )
8995
9096
9197def _check_cryptography (cryptography_version ):
@@ -96,8 +102,10 @@ def _check_cryptography(cryptography_version):
96102 return
97103
98104 if cryptography_version < [1 , 3 , 4 ]:
99- warning = "Old version of cryptography ({}) may cause slowdown." .format (
100- cryptography_version
105+ warning = (
106+ "Old version of cryptography ({}) may cause slowdown." .format (
107+ cryptography_version
108+ )
101109 )
102110 warnings .warn (warning , RequestsDependencyWarning )
103111
0 commit comments