Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant