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

tidy: enforce list() and dict() #1876

Open
reidpr opened this issue Mar 22, 2024 · 0 comments
Open

tidy: enforce list() and dict() #1876

reidpr opened this issue Mar 22, 2024 · 0 comments

Comments

@reidpr
Copy link
Collaborator

reidpr commented Mar 22, 2024

Split from #1860. Pylint:

  • R1734 use-list-literal
  • R1735 use-dict-literal

ol = list()

Pylint’s sole argument seems to be performance, which to me seems a clear case of premature optimization. The issue that introduced the checks, pylint-dev/pylint#4365, contains no reasoning at all, just the assertion that the literals would be “would be clearer”.

I like list() and dict() and set() and tuple() better myself for empty collections. Let’s enforce that instead.

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

No branches or pull requests

1 participant