machinalis / mypy-data

mypy typesheds for the Python data stack
BSD 3-Clause "New" or "Revised" License
86 stars 23 forks source link

buffer arguments need to be restricted #7

Open dmoisset opened 8 years ago

dmoisset commented 8 years ago

Some function arguments accept only objects with a buffer interface as described by PEP-3118. That's a C level API and it's not backed by any Python methods so it's hard to describe in mypy, so those arguments are currently described as Any

This need some support from python; see some related discussions at:

http://permalink.gmane.org/gmane.comp.python.devel/156411 http://bugs.python.org/issue27501