Sublime Forum

Python 3.5 Type Hinting (PEP484)

#1

Sublime Text 3 build 3103

Hi,

Syntax highlighting (PEP484) doesn’t work on build 3103. I’ve seen some old threads about this but I’d like to know whether this is in development? It’s otherwise a great IDE, but would love this functionality.

Thanks

Jake

0 Likes

#2

I’m unsure why you are specifically pointing to PEP484 with regard to syntax highlighting. Do you want ST to highlight annotations (defined in PEP3107) or do you want it to do static analysis of your code?

0 Likes

#3

I’m having this issue, too!

I have the following code, sublime v3114, sublimelinter, and flake8:

def get_paypal_details(self, token) -> dict:

Flake8 highlights this as a syntax error (no error code is visible), and there’s no syntax highlighting.

I’m in an activated python3 virtualenv, with the following:

"settings":
{
	"python_interpreter": ".direnv/python-3.5.1/bin/python3"
}

I also have djaneiro installed, and have tried setting the file’s syntax to ‘python’ / ‘python django’ to no avail.

I have Anaconda disabled atm,. because it has not solved this ‘invalid syntax’ issue for me. I’ve tried various combinations of settings, paths, etc inspired by the following: http://stackoverflow.com/questions/35537207/anacondasublimetext-reports-type-hinting-as-errors

Hope someone can help… I’m no pythonista!

TIA, ptim

0 Likes

#4

PEBKAC!

faulty config of sublimelinter-flake8… ignore me, carry on…

resolved by: https://github.com/SublimeLinter/SublimeLinter3/issues/473#issuecomment-241645718

0 Likes