Skip to content
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

check if source_list is None before treating as array #550

Merged
merged 1 commit into from
Aug 28, 2022

Conversation

kheyse
Copy link
Contributor

@kheyse kheyse commented Aug 23, 2022

len(None) will throw an error

@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #550 (fd700cc) into main (554ef06) will increase coverage by 0%.
The diff coverage is 100%.

@@         Coverage Diff         @@
##           main   #550   +/-   ##
===================================
  Coverage    96%    96%           
===================================
  Files        59     60    +1     
  Lines      2470   2476    +6     
===================================
+ Hits       2368   2374    +6     
  Misses      102    102           
Impacted Files Coverage Δ
...ontrollerx/cx_core/type/media_player_controller.py 98% <100%> (ø)
apps/controllerx/controllerx.py 100% <0%> (ø)
apps/controllerx/cx_devices/smartkontakten.py 100% <0%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@xaviml
Copy link
Owner

xaviml commented Aug 28, 2022

Hi @kheyse,

Thank you for the PR, I also added the Optional when source_list is declared, so we ensure mypy understands it can be None.

Regards,
Xavi M.

@xaviml xaviml merged commit 70c50ab into xaviml:main Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants