Skip to content

Fully specify ScopedObject.__aexit__ typing#32

Open
tjstum wants to merge 1 commit intooremanj:masterfrom
tjstum:aexit
Open

Fully specify ScopedObject.__aexit__ typing#32
tjstum wants to merge 1 commit intooremanj:masterfrom
tjstum:aexit

Conversation

@tjstum
Copy link
Copy Markdown
Contributor

@tjstum tjstum commented Oct 16, 2025

If you mix-in both trio.abc.AsyncResource and tricycle.ScopedObject into the same class, you get an error from mypy:

ERROR: Definition of "__aexit__" in base class "AsyncResource" is incompatible with definition in base class "ScopedObject"  [misc]

trio.abc.AsyncResource has the full spelling of __aexit__, so just do the full spelling here too

If you mix-in both `trio.abc.AsyncResource` and `tricycle.ScopedObject`
into the same class, you get an error from mypy:
```
ERROR: Definition of "__aexit__" in base class "AsyncResource" is incompatible with definition in base class "ScopedObject"  [misc]
```

`trio.abc.AsyncResource` has the full spelling of `__aexit__`, so just
do the full spelling here too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant