-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Removing asyncio.coroutine syntax from some components #12507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
homeassistant/components/knx.py
Outdated
self.exposures.append(exposure) | ||
|
||
async def telegram_received_cb(self, telegram): | ||
>>>>>>> 2995813... Removing asyncio.coroutine syntax (first steps) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected an indented block
missing whitespace around operator
whitespace before '('
homeassistant/components/knx.py
Outdated
@asyncio.coroutine | ||
def telegram_received_cb(self, telegram): | ||
======= | ||
@callback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected indentation
homeassistant/components/knx.py
Outdated
@asyncio.coroutine | ||
def telegram_received_cb(self, telegram): | ||
======= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected an indented block
missing whitespace around operator
homeassistant/components/knx.py
Outdated
@@ -202,8 +204,32 @@ def register_callbacks(self): | |||
self.xknx.telegram_queue.register_telegram_received_cb( | |||
self.telegram_received_cb, address_filters) | |||
|
|||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected 2 blank lines after class or function definition, found 1
missing whitespace around bitwise or shift operator
missing whitespace around operator
homeassistant/components/knx.py
Outdated
======= | ||
hass.data[DATA_KNX].async_create_exposures() | ||
await hass.data[DATA_KNX].start() | ||
>>>>>>> 2995813... Removing asyncio.coroutine syntax (first steps) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace around operator
whitespace before '('
homeassistant/components/knx.py
Outdated
yield from hass.data[DATA_KNX].start() | ||
======= | ||
hass.data[DATA_KNX].async_create_exposures() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unexpected indentation
homeassistant/components/knx.py
Outdated
yield from hass.data[DATA_KNX].start() | ||
======= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace around operator
homeassistant/components/knx.py
Outdated
"""Set up the KNX component.""" | ||
from xknx.exceptions import XKNXException | ||
try: | ||
hass.data[DATA_KNX] = KNXModule(hass, config) | ||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IndentationError: unexpected unindent
missing whitespace around bitwise or shift operator
missing whitespace around operator
We should first do core, helpers, util (if any). Then let's look at entity components like Also, anything that will be merged between now and wednesday will cause you a merge conflict. I am excited too but I suggest to hold off till after the branch has been cut. |
The work here was done by a script (with 2 manual pylint adoptions) - so i'm not disappointed if we throw it away. I will try out the script on some core libraries tomorrow and see what travis thinks about it :) |
@@ -53,8 +52,8 @@ | |||
}) | |||
|
|||
|
|||
@asyncio.coroutine | |||
def async_setup_platform(hass, config, async_add_devices, discovery_info=None): | |||
async def async_setup_platform(hass, config, async_add_devices, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no test for KNX, did you test this locally?
@asyncio.coroutine | ||
def async_setup_platform(hass, config, async_add_devices, | ||
discovery_info=None): | ||
async def async_setup_platform(hass, config, async_add_devices, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test this locally?
Description:
HASS is about to deprecate python3.4. Yay!
We therefore may get rid of the ugly asyncio.coroutine syntax.
Within this PR i will add more and more components with the new
async def
andawait
syntax.