Václav Brožek <v...@google.com> added the comment:

https://github.com/python/cpython/pull/23729 is now a follow-up to improve docs 
and error message about the assert misspellings.

I'm now looking at the misspelled arguments: autospec and spec_set. These are 
accepted by patch, patch.object and patch.multiple, and spec_set is also 
accepted by create_autospec.

The three frequent misspellings I saw in our codebase are auto_spec, autospect 
and set_spec. I could add a check to look for them in kwargs, and also add an 
"unsafe" argument (default False), which, when True, disables the check. This 
would mimic what is already done for the misspelled asserts.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41877>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to