Pgcooldown

Latest version: v0.2.14

Safety actively analyzes 682471 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.2.14

- Fixed type error when calling float(lerp_thing)

0.2.13

- Fix division by zero if duration == 0

0.2.12

- Allow duration of 0
- Operators for LerpThing
- Test updates and enhancements

0.2.10

- typehints

0.2.9

- Pause can be passed to init, useful repr
- Note in docs, that Cooldown.reset() also unpauses.
- Update README.md

0.2.8

Breaking change! Properties gone!

I was aware, that there is a slight overhead when using properties, but
during A benchmark, that difference turned out to be 17%.

Since this package is still marked as Alpha and probably nobody is using
it besides me, the interface is now changed from properties to functions
in all places.

Tests needed to be adapted, but run clean now (and also more exact using
`pytest.approx` instead of `round`.

The following properties now need to be called as functions:

cold -> cold()
cold.setter -> set_cold(bool)
hot -> hot()
temperature -> temperature()
temperature.setter -> set_to(val)
remaining -> remaining()
remaining.setter -> set_to(val)
normalized -> normalized()
v -> removed, just use instance()

As stated initially, this is 17% less overhead when testing for cold,
etc. Performance of LerpThing increased from 1.3mio calls to 1.8mio due
to this change.

Sorry for any inconvenience, if anybody is using this, but that bad
design decision needed to be fixed if any more people would use this.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.