You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
When using mypy-style type hinting in python, the syntax highlighting gets confused and no longer correctly identifies strings and keywords.
See:
Steps to Reproduce
The following code was used to reproduce the above screenshot
"""An example of how highlighting with type hinting works
"""
def reg_fun(foo):
"""Syntax highlighting identifies strings
"""
bar = foo + 1
return bar
def my_fun(foo: float) -> None:
"""The syntax highlighting is now confused
"""
bar = foo + 2
return bar
def third_fun(foo):
"""The string is identified but the def word is wrong
"""
bar = foo + 3
return bar
Expected behavior: [What you expect to happen]
The highlighting should (best case) recognize the type hints, or (acceptable case) ignore them so that the highlighting works.
Actual behavior: [What actually happens]
When type hints are used, the type hinting no longer works.
It appears that the -> is a key element of this; if I remove this, syntax highlighting works as expected:
Reproduces how often: [What percentage of the time does it reproduce?]
Always
Versions
You can get this information from copy and pasting the output of atom --version and apm --version from the command line. Also, please include the OS and what version of the OS you're running.
$ atom --version
Atom : 1.23.3
Electron: 1.6.15
Chrome : 56.0.2924.87
Node : 7.4.0
$ apm --version
apm 1.18.12
npm 3.10.10
node 6.9.5 x64
atom 1.23.3
python 3.6.4
git 2.16.1
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.
Activity
winstliu commentedon Feb 9, 2018
Was fixed in #228, scheduled for release with Atom 1.25.