File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -143,11 +143,12 @@ def __get_openssl_constructor(name):
143143
144144def __data_argument (funcname , data_sentinel , kwargs ):
145145 if '__data_sentinel' in kwargs :
146- raise TypeError ("'__data_sentinel' is not a valid keyword argument" )
146+ raise TypeError (f"{ funcname } (): got an unexpected keyword "
147+ f"parameter '__data_sentinel'" )
147148 if 'data' in kwargs and 'string' in kwargs :
148- raise TypeError (" 'data' and 'string' are mutually exclusive "
149- "and support for 'string' keyword parameter "
150- "is slated for removal in a future version." )
149+ raise TypeError (f" { funcname } (): 'data' and 'string' are mutually exclusive "
150+ f "and support for 'string' keyword parameter is slated for "
151+ f" removal in a future version." )
151152 if data_sentinel is None :
152153 if 'data' in kwargs :
153154 # new(name, data=...)
You can’t perform that action at this time.
0 commit comments