python-tabulate
python-tabulate copied to clipboard
Do not call `getattr` with a constant value
It is not any safer than normal property access.
It feels like the intent might have been hasattr() instead of getattr(), but the initial commit e2086c3 appears to :
- assume any attribute
dtypeis of typenumpy.dtype, - test whether
numpy.dtype.namesis a list of fields names orNone.
https://numpy.org/doc/stable/reference/generated/numpy.dtype.names.html
Requires https://github.com/astanin/python-tabulate/pull/373.