File: Broken/Core/BrokenTrackers.py
¶
Broken.Core.BrokenTrackers ¶
SameTracker ¶
Doumo same desu. If a value is the same, returns True, else updates it and returns False • Useful on ignoring expensive calls where parameters doesn't changes
Source code in Broken/Core/BrokenTrackers.py
11 12 13 14 15 16 17 18 19 20 21 |
|
OnceTracker ¶
Returns False the first time it's called, never nest style: if once/already(): return
Source code in Broken/Core/BrokenTrackers.py
23 24 25 26 27 28 29 30 31 32 |
|
__call__ ¶
__call__() -> bool
Source code in Broken/Core/BrokenTrackers.py
28 29 30 31 32 |
|
PlainTracker ¶
Source code in Broken/Core/BrokenTrackers.py
34 35 36 37 38 39 40 41 42 |
|
__call__ ¶
__call__(set: bool = None) -> bool
Returns value if None else sets it
Source code in Broken/Core/BrokenTrackers.py
38 39 40 41 42 |
|
FileTracker ¶
Source code in Broken/Core/BrokenTrackers.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
__attrs_post_init__ ¶
__attrs_post_init__()
Source code in Broken/Core/BrokenTrackers.py
49 50 51 52 53 54 55 |
|
__enter__ ¶
__enter__() -> Self
Source code in Broken/Core/BrokenTrackers.py
64 65 |
|
__exit__ ¶
__exit__(*args) -> None
Source code in Broken/Core/BrokenTrackers.py
67 68 |
|
trigger ¶
trigger(update: bool = False) -> bool
True if it's been more than 'self.retention' since the last run
Source code in Broken/Core/BrokenTrackers.py
81 82 83 84 85 86 87 |
|
update ¶
update(**shift: dict) -> None
Source code in Broken/Core/BrokenTrackers.py
89 90 91 92 |
|