Skip to content

SIM108 suggested for code block that could have been simplified to an or #12189

@brettcannon

Description

@brettcannon
  • List of keywords you searched for before creating this issue: SIM108
  • A minimal code snippet that reproduces the bug.
if raw_data["subtest"]:
        test_id = raw_data["subtest"]
    else:
        test_id = raw_data["test"]
  • The command you invoked: pipx run ruff check --fix --select SIM unittestadapter/execution.py
  • The current Ruff version: 0.5.0

I would have expected the code block to be simplified to test_id = raw_data["subtest"] or raw_data["test"].

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedReady for implementationruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions