Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

function-redefined raised on conditionally-defined code #1358

Closed
@brettcannon

Description

@brettcannon

E.g.

if __debug__:
    def spam():
        return 42
else:
    def spam():  # Flagged as a redefinition.
        return -13

This is also a very common pattern when you use different code based on OS, whether a module is available, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions