Skip to content

misclick #2748

@A5rocks

Description

@A5rocks
          The signature in [argonholm/exceptiongroup](https://github.com/agronholm/exceptiongroup/blob/0878b8331a905f18b4d39b24b105b3e514ada65b/src/exceptiongroup/_exceptions.py#L213) is
    def derive(self: Self, __excs: Sequence[_BaseExceptionT_co]) -> Self:

and in typeshed it is

# In reality it is `NonEmptySequence`:
@overload
def derive(self, __excs: Sequence[_ExceptionT]) -> ExceptionGroup[_ExceptionT]: ...
@overload
def derive(self, __excs: Sequence[_BaseExceptionT]) -> BaseExceptionGroup[_BaseExceptionT]: ...

I found agronholm/exceptiongroup#40, python/typeshed#9219, and python/typeshed#9230 and reading those it seems that this should've been resolved?

It might be that disallow_any_generics would flag something further up if you enabled it

Originally posted by @jakkdl in #2733 (comment)

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