i3blocks-contrib
i3blocks-contrib copied to clipboard
weather_US_NWS: add weather_US_NWS, fetches weather from the US NWS
NWS: National Weather Service https://weather.gov
Hello @andrewcleveland I know it's been a while since you opened this PR, I'd like to integrate it into a fork we're creating to keep the i3blocks-contrib repository updated.
You PR looks pretty good! It is a nice and useful block, in case you're still using i3blocks and interested in it getting merged could you please fix the following errors pylint found?
************* Module weather
weather.py:17:0: C0325: Unnecessary parens after 'if' keyword (superfluous-parens)
weather.py:19:0: C0325: Unnecessary parens after 'if' keyword (superfluous-parens)
weather.py:108:0: C0325: Unnecessary parens after 'if' keyword (superfluous-parens)
weather.py:109:0: C0325: Unnecessary parens after 'if' keyword (superfluous-parens)
weather.py:113:0: C0325: Unnecessary parens after 'elif' keyword (superfluous-parens)
weather.py:115:0: C0325: Unnecessary parens after 'elif' keyword (superfluous-parens)
weather.py:124:0: C0325: Unnecessary parens after 'if' keyword (superfluous-parens)
weather.py:133:0: C0325: Unnecessary parens after 'if' keyword (superfluous-parens)
weather.py:154:0: C0325: Unnecessary parens after 'if' keyword (superfluous-parens)
weather.py:161:0: C0325: Unnecessary parens after 'if' keyword (superfluous-parens)
weather.py:1:0: C0114: Missing module docstring (missing-module-docstring)
weather.py:9:0: E0401: Unable to import 'defusedxml.ElementTree' (import-error)
weather.py:12:0: C0115: Missing class docstring (missing-class-docstring)
weather.py:16:4: C0116: Missing function or method docstring (missing-function-docstring)
weather.py:16:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
weather.py:23:4: C0116: Missing function or method docstring (missing-function-docstring)
weather.py:34:0: C0116: Missing function or method docstring (missing-function-docstring)
weather.py:37:17: W0108: Lambda may not be necessary (unnecessary-lambda)
weather.py:95:0: C0116: Missing function or method docstring (missing-function-docstring)
weather.py:107:0: C0116: Missing function or method docstring (missing-function-docstring)
weather.py:122:0: C0116: Missing function or method docstring (missing-function-docstring)
weather.py:138:0: C0116: Missing function or method docstring (missing-function-docstring)
-----------------------------------
Your code has been rated at 6.87/10
Thanks in advance!
Hi @da-edra, I've made some changes so that pylint no longer shows any errors: https://github.com/vivien/i3blocks-contrib/commit/24fbd836264f35b80c0d35783ac560778f13d44a Thanks.
Would it be possible to take another look at this?