Skip to content

New 4xx rule: after except* FooError as e:, warn on e.attribute for attributes that don't exist on ExceptionGroup #301

Closed

Description

@Zac-HD

This is redundant with a strict typechecker or 100% code coverage, but it's an easy mistake to make when you're migrating error-handling code to use except* and a linter would help for code that doesn't have those other checks.

Activity

  1. changed the title [-]New rule: after `except* FooError as e:`, warn on `e.attribute` for attributes that don't exist on `ExceptionGroup`[/-] [+]New 1xx rule: after `except* FooError as e:`, warn on `e.attribute` for attributes that don't exist on `ExceptionGroup`[/+] on Oct 17, 2024
  2. jakkdl commented on Dec 30, 2024

    @jakkdl
    Member

    per #334 I think this should go into a new series of 4xx rules

  3. changed the title [-]New 1xx rule: after `except* FooError as e:`, warn on `e.attribute` for attributes that don't exist on `ExceptionGroup`[/-] [+]New 4xx rule: after `except* FooError as e:`, warn on `e.attribute` for attributes that don't exist on `ExceptionGroup`[/+] on Jan 4, 2025
  4. jakkdl commented on Jun 3, 2025

    @jakkdl
    Member

    Was implemented in #379 as ASYNC400 except-star-invalid-attribute

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