Skip to content

Improve PBR008 boa restrictor rule #40

@giacomotolari

Description

@giacomotolari

When using the # noqa: PBR008 comment to disable the boa PBR008 restrictor rule, it appears to only work when placed at the top of the test method. Inline usage (e.g., directly on a for loop inside the method) does not prevent the warning.

Image Image Image

This becomes problematic in test cases with multiple for loops, where it would be more readable and maintainable to disable the rule only for a specific instance.


Additionally, if the for loop is wrapped in an any(...), the PBR008 warning isn't triggered at all. Is this expected behavior?

Image

It would be helpful to:

  • Clarify whether inline # noqa: PBR008 is intended to be supported.

  • Know whether the lack of a warning when using any(for...) is by design.

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