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

STYLE: Lint for comprehensions that use the list/set/dict functions #18464

Closed
mroeschke opened this issue Nov 24, 2017 · 0 comments · Fixed by #22075
Closed

STYLE: Lint for comprehensions that use the list/set/dict functions #18464

mroeschke opened this issue Nov 24, 2017 · 0 comments · Fixed by #22075
Labels
Code Style Code style, linting, code_checks
Milestone

Comments

@mroeschke
Copy link
Member

xref #18383

Ideally comprehensions should follow the general pattern:

list(x for x in iterator) --> [x for x in iterator]
set(x for x in iterator) --> {x for x in iterator}
dict((x,x) for x in iterator) --> {x: x for x in iterator}

Adding a lint check for the prior pattern in ci/lint.sh would be great.

@jreback jreback added the Code Style Code style, linting, code_checks label Nov 24, 2017
@jreback jreback added this to the 0.22.0 milestone Nov 24, 2017
@jorisvandenbossche jorisvandenbossche modified the milestones: 0.23.0, Next Major Release Mar 29, 2018
@jreback jreback modified the milestones: Contributions Welcome, 0.24.0 Jul 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants