Skip to content

False positive for PD011 when pd does not exist in module #3807

@danparizher

Description

@danparizher

Code Snippet:

async def select_callback(
    self,
    select: discord.ui.Select,
    interaction: discord.Interaction,
) -> None:  # the function called when the user is done selecting options
    value = select.values[0]
    if value == "current_value":
        # do nothing
        await interaction.response.defer()
        return

PD011 comes up on the line value = select.values[0], but pd doesn't even exist in this module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-inferenceRequires more advanced type inference.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions