Upgrade pylint to 2.1.0 (#15811)
* Upgrade pylint to 2.1.0 * Remove no longer needed pylint disables
This commit is contained in:
parent
0c7d46927e
commit
3246b49a45
11 changed files with 3 additions and 17 deletions
|
@ -122,7 +122,6 @@ class BayesianBinarySensor(BinarySensorDevice):
|
|||
def async_added_to_hass(self):
|
||||
"""Call when entity about to be added."""
|
||||
@callback
|
||||
# pylint: disable=invalid-name
|
||||
def async_threshold_sensor_state_listener(entity, old_state,
|
||||
new_state):
|
||||
"""Handle sensor state changes."""
|
||||
|
|
|
@ -86,7 +86,6 @@ class ThresholdSensor(BinarySensorDevice):
|
|||
self._state = False
|
||||
self.sensor_value = None
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
@callback
|
||||
def async_threshold_sensor_state_listener(
|
||||
entity, old_state, new_state):
|
||||
|
|
|
@ -26,9 +26,6 @@ CONF_PROJECT_DUE_DATE = 'due_date_days'
|
|||
CONF_PROJECT_LABEL_WHITELIST = 'labels'
|
||||
CONF_PROJECT_WHITELIST = 'include_projects'
|
||||
|
||||
# https://github.com/PyCQA/pylint/pull/2320
|
||||
# pylint: disable=fixme
|
||||
|
||||
# Calendar Platform: Does this calendar event last all day?
|
||||
ALL_DAY = 'all_day'
|
||||
# Attribute: All tasks in this project
|
||||
|
|
|
@ -254,8 +254,6 @@ def _mean_tuple(*args):
|
|||
return tuple(sum(l) / len(l) for l in zip(*args))
|
||||
|
||||
|
||||
# https://github.com/PyCQA/pylint/issues/1831
|
||||
# pylint: disable=bad-whitespace
|
||||
def _reduce_attribute(states: List[State],
|
||||
key: str,
|
||||
default: Optional[Any] = None,
|
||||
|
|
|
@ -124,7 +124,6 @@ class MinMaxSensor(Entity):
|
|||
self.states = {}
|
||||
|
||||
@callback
|
||||
# pylint: disable=invalid-name
|
||||
def async_min_max_sensor_state_listener(entity, old_state, new_state):
|
||||
"""Handle the sensor state changes."""
|
||||
if new_state.state is None or new_state.state in STATE_UNKNOWN:
|
||||
|
|
|
@ -97,7 +97,6 @@ class StatisticsSensor(Entity):
|
|||
hass.async_add_job(self._initialize_from_database)
|
||||
|
||||
@callback
|
||||
# pylint: disable=invalid-name
|
||||
def async_stats_sensor_state_listener(entity, old_state, new_state):
|
||||
"""Handle the sensor state changes."""
|
||||
self._unit_of_measurement = new_state.attributes.get(
|
||||
|
|
|
@ -142,7 +142,6 @@ class Template:
|
|||
self.hass.loop, self.async_render_with_possible_json_value, value,
|
||||
error_value).result()
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
def async_render_with_possible_json_value(self, value,
|
||||
error_value=_SENTINEL):
|
||||
"""Render template with value exposed.
|
||||
|
|
|
@ -78,7 +78,6 @@ async def async_million_events(hass):
|
|||
|
||||
|
||||
@benchmark
|
||||
# pylint: disable=invalid-name
|
||||
async def async_million_time_changed_helper(hass):
|
||||
"""Run a million events through time changed helper."""
|
||||
count = 0
|
||||
|
@ -109,7 +108,6 @@ async def async_million_time_changed_helper(hass):
|
|||
|
||||
|
||||
@benchmark
|
||||
# pylint: disable=invalid-name
|
||||
async def async_million_state_changed_helper(hass):
|
||||
"""Run a million events through state changed helper."""
|
||||
count = 0
|
||||
|
|
4
pylintrc
4
pylintrc
|
@ -11,7 +11,6 @@
|
|||
# too-few-* - same as too-many-*
|
||||
# abstract-method - with intro of async there are always methods missing
|
||||
# inconsistent-return-statements - doesn't handle raise
|
||||
# useless-return - https://github.com/PyCQA/pylint/issues/2300
|
||||
# not-an-iterable - https://github.com/PyCQA/pylint/issues/2311
|
||||
disable=
|
||||
abstract-class-little-used,
|
||||
|
@ -33,8 +32,7 @@ disable=
|
|||
too-many-public-methods,
|
||||
too-many-return-statements,
|
||||
too-many-statements,
|
||||
unused-argument,
|
||||
useless-return
|
||||
unused-argument
|
||||
|
||||
[REPORTS]
|
||||
reports=no
|
||||
|
|
|
@ -8,7 +8,7 @@ flake8==3.5
|
|||
mock-open==1.3.1
|
||||
mypy==0.620
|
||||
pydocstyle==1.1.1
|
||||
pylint==2.0.1
|
||||
pylint==2.1.0
|
||||
pytest-aiohttp==0.3.0
|
||||
pytest-cov==2.5.1
|
||||
pytest-sugar==0.9.1
|
||||
|
|
|
@ -9,7 +9,7 @@ flake8==3.5
|
|||
mock-open==1.3.1
|
||||
mypy==0.620
|
||||
pydocstyle==1.1.1
|
||||
pylint==2.0.1
|
||||
pylint==2.1.0
|
||||
pytest-aiohttp==0.3.0
|
||||
pytest-cov==2.5.1
|
||||
pytest-sugar==0.9.1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue