core/homeassistant/util
Andrea Campi e627544479 Always consume the no_throttle keyword argument. (#11126)
The current code relies on the assumption that the first invocation will never specify no_throttle=True.
However that puts us in a pickle when writing unit tests: if we had a fictitious:

  def setup_platform():
    update()

  @Throttle(MIN_TIME_BETWEEN_SCANS)
  def update():
    pass

Then given multiple tests, the second and some of subsequent tests would be throttled (depending on timing).
But we also can't change that code to call `update(no_throttle=True)' because that's not currently accepted.

This diff shouldn't change the visibile behavior of any component, but allows this extra flexibility.
2017-12-13 20:01:59 -08:00
..
__init__.py Always consume the no_throttle keyword argument. (#11126) 2017-12-13 20:01:59 -08:00
async.py Update docstrings (#7374) 2017-05-02 09:18:47 -07:00
color.py make RGB values consistent as int. fixes #10766 (#10782) 2017-11-27 11:31:35 +01:00
decorator.py Clean up OwnTracks (#9569) 2017-09-25 09:05:09 -07:00
distance.py Add unit system support 2016-08-04 22:02:19 -07:00
dt.py Disable invalid-sequence-index (#7177) 2017-04-19 14:09:00 +02:00
json.py Extracted json saving and loading (#10216) 2017-11-01 09:08:28 +01:00
location.py Fix a bunch of typos (#9545) 2017-09-23 17:15:46 +02:00
logging.py Unit tests to improve core coverage (#9659) 2017-10-02 20:25:04 -07:00
package.py Fix check for running inside venv (#8481) 2017-07-15 07:25:02 -07:00
temperature.py Fix some issues for PyLint 1.7.2 (#8356) 2017-07-05 20:02:16 -07:00
unit_system.py Fix typos (#7957) 2017-06-08 15:53:12 +02:00
yaml.py Allow unicode when dumping yaml (#10607) 2017-11-15 18:24:08 -08:00