ardabro ardabro - 2 years ago 208
Python Question

anaconda+sublimetext, reports type hinting as errors

I have two python projects in sublimetext3 with anaconda. For some myterious reasons only in one of them anaconda reports type hinting (PEP 0484) as "invalid syntax" errors (for both: parameter and function types). What can be the reason?

Answer Source

Anaconda's application of PEP-484 Type Hints (influenced by PEP-3107 Function Annotations and the mypy static type checker) only applies to Python 3. I would assume the project that is throwing errors is being linted by Python 2.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download