Skip to content

STYLE: Additional flake8 checks #22122

Closed
Closed
@mroeschke

Description

@mroeschke

Currently we ignore some flake8 checks:

Checks that (currently) we're okay with skipping

  • E402, # module level import not at top of file
  • E731, # do not assign a lambda expression, use a def
  • W503 # line break before binary operator

Checks that should be run

  • E741, # do not use variables named 'l', 'O', or 'I' Enforce flake8 E741 #22795 (CLN: Flake8 E741 #23131)
  • C405, # Unnecessary (list/tuple) literal - rewrite as a set literal.
  • C406 # Unnecessary (list/tuple) literal - rewrite as a dict literal.
  • C408, # Unnecessary (dict/list/tuple) call - rewrite as a literal.
  • C409, # Unnecessary (list/tuple) passed to tuple() - (remove the outer call to tuple()/rewrite as a tuple literal).
  • C410 # Unnecessary (list/tuple) passed to list() - (remove the outer call to list()/rewrite as a list literal).

Ideally, we should continue to lint our codebase with reasonable flake8 checks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Code StyleCode style, linting, code_checksMaster TrackerHigh level tracker for similar issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions