Skip to content

Warn on ExceptionGroup subclass without derive #334

Closed

Description

@A5rocks

While there's probably some usecase which makes sense for this, at most someone could just implement like so:

class CustomEG(ExceptionGroup):
  def derive(self, exs):
    return ExceptionGroup(self.message, exs)

to get the original behavior (I think). From python-trio/trio#3175

Activity

  1. jakkdl commented on Dec 30, 2024

    @jakkdl
    Member

    I was thinking that maybe this would fit better in flake8-bugbear due to being exceptiongroup-related and not necessarily async-specific, but given #302, #311, #301, #298 I think the best approach is creating a new 4xx series of rules for exceptiongroup-specific warnings.

  2. added a commit that references this issue on Apr 22, 2026
    574638f
  3. added a commit that references this issue on Apr 22, 2026
    129f952
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions