Skip to content

Implement flake8-raise #2347

@ngnpope

Description

@ngnpope

GitHub, PyPI.

  • R100: raise in except handler without from
    • Already implemented via B904 from flake8-bugbear
    • Already implemented via TRY200 from tryceratops
      • This is buggy and only triggers with raise Exception() and not raise Exception (no parentheses)
    • Maybe implementation for one of these should be scrapped with the error code aliased to the other? 🤔
  • R101: use bare raise in except handler
  • R102: unnecessary parentheses on raised exception

So this plugin is mostly implemented. R102 looks like it should be a relatively easy rule to define.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pluginImplementing a known but unsupported plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions