atom / language-python

Python package for Atom
Other
190 stars 146 forks source link

'in' is not highlighted if used after a for statement #304

Closed rohit49plus2 closed 5 years ago

rohit49plus2 commented 5 years ago

Prerequisites

Description

'in' and the subsequent indented code block is not highlighted when used after a for statement.

Steps to Reproduce

  1. Any statement like "for item in list:" will not highlight the 'in' keyword.

Expected behavior: Syntax highlighting for the 'in' keyword.

Actual behavior: No highlighting bug-python-highlighting-in

Reproduces how often: 100% of the time

Versions

Atom : 1.37.0 Electron: 2.0.18 Chrome : 61.0.3163.100 Node : 8.9.3

rsese commented 5 years ago

Thanks for the report! I'm unable to reproduce on macOS 10.12.6 with 1.37.0 using your example (not sure if line 2 is cut off or not, sharing the entire example for copy/pasting is helpful):

for item in pi:
    sanctioncondition = item[0] in sanction_codes and item[1] in doi
    if sanctioncondition:
        return True
return False

Screenshot:

python-in

Can you reproduce with this example as well?

fruits = ["apple", "banana", "cherry"]
for x in fruits:
  print(x)
no-response[bot] commented 5 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.