Skip to content

Releases: aiogram/magic-filter

v1.0.12

25 Sep 23:17
8ea680a
Compare
Choose a tag to compare

What's Changed

  • Replace deprecated isort and bump mypy in #16
  • Regexp functions support in #13
  • Fixed extract operation for negative results, just returns None instead of False

Full Changelog: v1.0.11...v1.0.12

v1.0.11

26 Jul 21:44
b8d7b2a
Compare
Choose a tag to compare

What's Changed

  • Use abstract Container type for in operations (#9)
  • Added .extract(...) operation that helps to extract items from list that which meets the condition (F.foo.extract(F > 5))
  • Add __bool__ method that always returns True to add possibility to check if magic: (the same as if magic is not None)
  • Extended func operation, added possibility to use *args, **kwargs
  • Added possibility to specify regexp flags

Full Changelog: v1.0.10...v1.0.11

v1.0.10

16 Jul 23:38
71b9754
Compare
Choose a tag to compare
  • Added hint for len(F) error (#8)
  • Added not in operation (#10)
  • Migrated to hatchling (#11)

Preventing magic from getting out of control

11 Sep 14:28
a573b54
Compare
Choose a tag to compare
  • The instance of MagicFilter cannot now be used as an iterable object because objects with a getitem method can be endlessly iterated, which is not the desired behavior (like zip-bomb).

v1.0.8

03 Jul 14:07
2578efa
Compare
Choose a tag to compare
  • Added .cast(callable) operation to make type-cast with suppressing any errors

v1.0.7

20 Apr 18:21
f98c8d9
Compare
Choose a tag to compare
  • Added "selector" operation which helps to check part of the object like F.chat[F.type == "private"]
  • Fixed sequences typing

v1.0.6

05 Mar 19:15
d95d549
Compare
Choose a tag to compare
  • Improved contains operation, added possibility to use Magic as argument in .in_(...) and .contains(...) operations
  • Improved regexp operation, added possibility to use search mode instead of match .regexp(pattern, search=True)
  • Other small changes and improvements

v1.0.5

14 Dec 21:08
Compare
Choose a tag to compare
  • Suppress TypeError/ValueError on function operation call (e. g. TypeError: object of type 'NoneType' has no len())
  • or operation marked as important to prevent reject condition

Typing

24 Nov 03:09
Compare
Choose a tag to compare

Improved MagicFilter typings

v1.0.3

09 Oct 21:21
Compare
Choose a tag to compare
  • Added AttrDict object