1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 03:42:20 +01:00

Bugfix/normalize core comparisons (and Python 3 update fixes) (#952)

* Correct implementation of comparisons to be Pythonic

If a comparison cannot be made return NotImplemented, this allows the
Python interpreter to try other comparisons (eg __ieq__) and either
return False (in the case of __eq__) or raise a TypeError
exception (eg in the case of __lt__).

* Python 3 updates

* Add a more helpful message in exception if platform is not defined

* Added a basic pre-commit check
This commit is contained in:
Tim Savage
2020-01-14 09:35:55 +11:00
committed by Brandon Davidson
parent 3b689ef39c
commit 30ecb58e06
4 changed files with 67 additions and 56 deletions

View File

@@ -50,7 +50,6 @@ CLASSIFIERS = [
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: MIT License',
'Programming Language :: C++',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Topic :: Home Automation',
]