Skip to content

B906: Do not warn for missing visit calls for bottom-level nodes #330

@felix-hilden

Description

@felix-hilden

Hey hey!

Just upgraded to the latest version to find some neat warnings (B906) about ast.NodeVisitor functions missing a further visit call. The suggestion was to call generic_visit. This is awesome in general, but unnecessary for:

  • Global
  • Nonlocal
  • Name
  • MatchAs
  • alias

Might be others as well, but these were the ones I hit. If you think it's reasonable, I'd like to suggest that bugbear suppresses the warnings for these nodes.

byeeeee

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