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

Add new checkers use-list-literal and use-dict-literal #4769

Merged
merged 7 commits into from
Jul 29, 2021

Commits on Jul 29, 2021

  1. Add use-list-literal and use-dict-literal

    This adds two checks for when empty lists and dicts are created
    using a function call instead of their literals.
    This closes pylint-dev#4365
    DanielNoord committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    6a139fa View commit details
    Browse the repository at this point in the history
  2. Conform code to use-list-literal, use-dict-literal

    With addition of the use-list-literal and use-dict-literal
    checkers some code had to be updated.
    As there is a real performance difference, the literal is preferred
    when it is as clear as using the function call.
    DanielNoord committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    1f4b168 View commit details
    Browse the repository at this point in the history
  3. Conform test to use-list-literal, use-dict-literal

    With addition of the use-list-literal and use-dict-literal
    checkers some code had to be updated.
    As there is a real performance difference, the literal is preferred
    when it is as clear as using the function call. For some tests
    ignoring the checker seemed better for clarity of the test.
    DanielNoord committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    4cdd984 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    15eba28 View commit details
    Browse the repository at this point in the history
  5. Implement review changes

    DanielNoord committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    6896046 View commit details
    Browse the repository at this point in the history
  6. Update pylint/checkers/refactoring/refactoring_checker.py

    Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
    DanielNoord and cdce8p committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    9389166 View commit details
    Browse the repository at this point in the history
  7. Update ChangeLog

    Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
    DanielNoord and cdce8p committed Jul 29, 2021
    Configuration menu
    Copy the full SHA
    947b8ef View commit details
    Browse the repository at this point in the history