Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Arguments following a default "()" are not properly colored #309

Open
1 task done
adambengis opened this issue Aug 3, 2019 · 1 comment
Open
1 task done

Arguments following a default "()" are not properly colored #309

adambengis opened this issue Aug 3, 2019 · 1 comment

Comments

@adambengis
Copy link

adambengis commented Aug 3, 2019

Prerequisites

Description

Function arguments following a default function argument value of "()" are not properly colored. Changing the tuple to a dictionary or a list do not produce the issue.

Steps to Reproduce

Use the example code in a file with python3 syntax highlighting.

def example(
  good_arg: int,
  trigger_arg: Iterable[int] = (),
  bad_arg: int = 2,
) -> None:
  pass

Expected behavior:

The good_arg, trigger_arg, and bad_arg names should all be highlighted the same.

Actual behavior:

good_arg and trigger_arg are highlighted correctly, then bad_arg is colored like a function name.

Reproduces how often:

Every time I've tested it.

Versions

adambengis-mbp:~ adambengis$ atom --version
Atom : 1.35.0
Electron: 2.0.18
Chrome : 61.0.3163.100
Node : 8.9.3
adambengis-mbp:~ adambengis$ apm --version
apm 2.1.3
npm 6.2.0
node 8.9.3 x64
atom 1.35.0
python 2.7.10
git 2.13.5

Additional Information

Python3 is being executed from a venv.

@adambengis adambengis changed the title Arguments following a default " Arguments following a default "()" are not properly colored Aug 3, 2019
@rsese
Copy link

rsese commented Aug 13, 2019

Thanks for the report -

Atom : 1.35.0

The latest stable release version of Atom is 1.39.1, I was unable to reproduce as described:

good_arg and trigger_arg are highlighted correctly, then bad_arg is colored like a function name.

With Settings > Core > Use Tree Sitter Parser enabled:

python-tree-sitter

So looks like a different issue now with the parameters?

python-tree-sitter-param-scope

vs. TextMate:

python-textmate-param-scope

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants