Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python asterisk (*) parameter is treated as a better comment #541

Open
AndreiMoraru123 opened this issue Nov 7, 2024 · 0 comments
Open

Comments

@AndreiMoraru123
Copy link

Hi folks,

Python uses the tokens (/) and (*) to separate positional and keyword arguments in a function signature.
It also uses the (*) and (**) tokens for unpacking iterables and dictionaries.

If the asterisk lands on a new line, this will trigger the colorization of this extension, even though it's not a comment.

Example with Better Comments:

image

Example without the extension:

image

The parameter names are comically long to force the formatter to place them on new lines.

The same goes for the unpacking operator in the case of a list, for example, also when it happens to land on a new line:

Example with Better Comments:

image

Example without the extension:

image

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

No branches or pull requests

1 participant