Skip to content

FURB118: false positive for pytest fixture #19305

@spaceone

Description

@spaceone

Summary

@pytest.fixture(scope='session')
def foo(bar):
    return bar['key']

cannot be written as FURB118:

foo = pytest.fixture(scope='session')(operator.itemgetter('key')) as the first argument of a pytest-fixture must be a keyword argument.

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContributions especially welcomeruleImplementing 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