Skip to content

v2.2.2a1

Choose a tag to compare

@FasterSpeeding FasterSpeeding released this 26 Dec 13:47
· 723 commits to master since this release
513ee22

2.2.2a1 - 2021-12-26

Added

  • Type based dependency injection now has ergonomic Union support.
    This means that for inject(type=Union[A, B, C])/inject(type=A | B | C) the dependency injector will try to find registered type injectors for A, B then C after trying to find a dependency injector for the literal Union.
  • Type based dependency injection now has support for defaults through unions with None and Optional.
    This means that, for inject(type=Union[A, B, None])/inject(type=A | B | None) and inject(type=Optional[A]), if no registered implementations are found for the relevant types then None will 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 limit limit-1.