v2.2.2a1
·
723 commits
to master
since this release
2.2.2a1 - 2021-12-26
Added
- Type based dependency injection now has ergonomic Union support.
This means that forinject(type=Union[A, B, C])/inject(type=A | B | C)the dependency injector will try to find registered type injectors forA,BthenCafter trying to find a dependency injector for the literal Union. - Type based dependency injection now has support for defaults through unions with
NoneandOptional.
This means that, forinject(type=Union[A, B, None])/inject(type=A | B | None)andinject(type=Optional[A]), if no registered implementations are found for the relevant types thenNonewill be injected for the relevant argument.
Changed
- Message command parser arguments are now passed by keyword instead of positionally.
- Cooldown checks can now run without a present AbstractOwners implementation.
Fixed
- The cooldown manager now increments the internal counter after checking for cooldown rather than before.
The old behaviour resulted in the last valid call to a bucket being ratelimited therefore essentially making the real-world limitlimit-1.