Skip to content

Fix london_underground issue#19642

Merged
MartinHjelmare merged 7 commits intohome-assistant:devfrom
robmarkcole:fix-tube
Dec 31, 2018
Merged

Fix london_underground issue#19642
MartinHjelmare merged 7 commits intohome-assistant:devfrom
robmarkcole:fix-tube

Conversation

@robmarkcole
Copy link
Copy Markdown
Contributor

@robmarkcole robmarkcole commented Dec 29, 2018

Description:

Now using https://pypi.org/project/london-tube-status/

Related issue (if applicable): fixes #19639

reason = ' *** '.join(
[status['reason'] for status in line['lineStatuses']])
reason = ' *** '.join([status['disruption']['additionalInfo']
for status in line['lineStatuses']])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuation line over-indented for visual indent

state = ' + '.join(sorted(set(statuses)))

if state == 'Good Service':
if state == 'Good Service': # if good status, this is the only status returned
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (88 > 79 characters)

reason = ' *** '.join(
[status['reason'] for status in line['lineStatuses']])
reason = ' *** '.join([status['disruption']['additionalInfo']
for status in line['lineStatuses']])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuation line under-indented for visual indent

reason = ' *** '.join(
[status['reason'] for status in line['lineStatuses']])
[status['disruption']['additionalInfo'] for status
in line['lineStatuses']]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuation line under-indented for visual indent

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can anyone help here? Spent 15 mins trying this

else:
reason = ' *** '.join(
[status['reason'] for status in line['lineStatuses']])
[status['disruption']['additionalInfo'] for status
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace

else:
reason = ' *** '.join(
[status['reason'] for status in line['lineStatuses']])
reason = " *** ".join(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The service interface, I/O and data parsing, should be moved to a standalone library published on pypi.

https://developers.home-assistant.io/docs/en/creating_platform_code_review.html#6-communication-with-devices-services

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

@robmarkcole
Copy link
Copy Markdown
Contributor Author

@MartinHjelmare changes made

Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

@MartinHjelmare MartinHjelmare merged commit ff80fc3 into home-assistant:dev Dec 31, 2018
@ghost ghost removed the in progress label Dec 31, 2018
@robmarkcole robmarkcole deleted the fix-tube branch December 31, 2018 14:25
@robmarkcole
Copy link
Copy Markdown
Contributor Author

Thanks!

@balloob balloob mentioned this pull request Jan 10, 2019
kellerza pushed a commit to kellerza/ha-core that referenced this pull request Jan 18, 2019
* Update london_underground.py

* Update test

* Update london_underground.py

* Update london_underground.py

* Update london_underground.py

* Fix lint

* Use london-tube-status==0.2
alandtse pushed a commit to alandtse/home-assistant that referenced this pull request Feb 12, 2019
* Update london_underground.py

* Update test

* Update london_underground.py

* Update london_underground.py

* Update london_underground.py

* Fix lint

* Use london-tube-status==0.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

london_underground fails due to missing key

5 participants