github chrisguidry/uncalled-for 0.3.0
0.3.0 - Stay classy

latest releases: 0.3.2, 0.3.1
one month ago

Dependency classes can now declare their own dependencies as class attributes, resolved automatically before __aenter__ runs:

class UserRepo(Dependency[UserRepo]):
    pool: Pool = Depends(get_pool)

    async def __aenter__(self) -> UserRepo:
        return UserRepo(self.pool)  # self.pool already resolved

Works with Depends(), Shared(), and bare Dependency instances. Dependencies on base classes are resolved for concrete children.

What's Changed

  • Add Codecov coverage and test result uploads to CI by @chrisguidry in #5
  • Support class-level dependency declarations by @chrisguidry in #6

Full Changelog: 0.2.0...0.3.0

Don't miss a new uncalled-for release

NewReleases is sending notifications on new releases.