On 10/7/20 9:00 AM, Markus Armbruster wrote:
More abuse of review to learn: even through we initialize with False, we
still need the type hint?

Dunno.

jsnow@scv ~/s/q/scripts (python-qapi-cleanup-pt1)> mypy --config-file=qapi/mypy.ini qapi/; qapi/visit.py:40: error: Function is missing a type annotation for one or more arguments
Found 1 error in 1 file (checked 14 source files)

...yup.

It also serves the purpose of constraining the type to also avoid unions with things that might be false-ish. Looks silly, but maybe future mypy installments will afford us more chances to use inference. It doesn't right now.

--js


Reply via email to