Skip to content

Add Matches & Top Level Imports

Choose a tag to compare

@ZechCodes ZechCodes released this 25 Mar 23:05
· 17 commits to main since this release

Matches

Adds the new matches module, a collection of protocols that can be used in match/case to identify if an object implements a certain dunder protocol. Currently Tramp includes these matches:

  • AsyncContextManager
  • AsyncIterable
  • AsyncIterator
  • Awaitable
  • Callable
  • ContextManager
  • Iterable
  • Iterator

Top Level Imports

Additionally, this release adds all Tramp modules to the top level __init__.py so that modules can be imported without a dot name

from tramp import matches