Upgrade pylint to 2.1.0 (#15811)

* Upgrade pylint to 2.1.0

* Remove no longer needed pylint disables
This commit is contained in:
Ville Skyttä 2018-08-04 16:22:22 +03:00 committed by Paulus Schoutsen
parent 0c7d46927e
commit 3246b49a45
11 changed files with 3 additions and 17 deletions

View file

@ -122,7 +122,6 @@ class BayesianBinarySensor(BinarySensorDevice):
def async_added_to_hass(self): def async_added_to_hass(self):
"""Call when entity about to be added.""" """Call when entity about to be added."""
@callback @callback
# pylint: disable=invalid-name
def async_threshold_sensor_state_listener(entity, old_state, def async_threshold_sensor_state_listener(entity, old_state,
new_state): new_state):
"""Handle sensor state changes.""" """Handle sensor state changes."""

View file

@ -86,7 +86,6 @@ class ThresholdSensor(BinarySensorDevice):
self._state = False self._state = False
self.sensor_value = None self.sensor_value = None
# pylint: disable=invalid-name
@callback @callback
def async_threshold_sensor_state_listener( def async_threshold_sensor_state_listener(
entity, old_state, new_state): entity, old_state, new_state):

View file

@ -26,9 +26,6 @@ CONF_PROJECT_DUE_DATE = 'due_date_days'
CONF_PROJECT_LABEL_WHITELIST = 'labels' CONF_PROJECT_LABEL_WHITELIST = 'labels'
CONF_PROJECT_WHITELIST = 'include_projects' CONF_PROJECT_WHITELIST = 'include_projects'
# https://github.com/PyCQA/pylint/pull/2320
# pylint: disable=fixme
# Calendar Platform: Does this calendar event last all day? # Calendar Platform: Does this calendar event last all day?
ALL_DAY = 'all_day' ALL_DAY = 'all_day'
# Attribute: All tasks in this project # Attribute: All tasks in this project

View file

@ -254,8 +254,6 @@ def _mean_tuple(*args):
return tuple(sum(l) / len(l) for l in zip(*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], def _reduce_attribute(states: List[State],
key: str, key: str,
default: Optional[Any] = None, default: Optional[Any] = None,

View file

@ -124,7 +124,6 @@ class MinMaxSensor(Entity):
self.states = {} self.states = {}
@callback @callback
# pylint: disable=invalid-name
def async_min_max_sensor_state_listener(entity, old_state, new_state): def async_min_max_sensor_state_listener(entity, old_state, new_state):
"""Handle the sensor state changes.""" """Handle the sensor state changes."""
if new_state.state is None or new_state.state in STATE_UNKNOWN: if new_state.state is None or new_state.state in STATE_UNKNOWN:

View file

@ -97,7 +97,6 @@ class StatisticsSensor(Entity):
hass.async_add_job(self._initialize_from_database) hass.async_add_job(self._initialize_from_database)
@callback @callback
# pylint: disable=invalid-name
def async_stats_sensor_state_listener(entity, old_state, new_state): def async_stats_sensor_state_listener(entity, old_state, new_state):
"""Handle the sensor state changes.""" """Handle the sensor state changes."""
self._unit_of_measurement = new_state.attributes.get( self._unit_of_measurement = new_state.attributes.get(

View file

@ -142,7 +142,6 @@ class Template:
self.hass.loop, self.async_render_with_possible_json_value, value, self.hass.loop, self.async_render_with_possible_json_value, value,
error_value).result() error_value).result()
# pylint: disable=invalid-name
def async_render_with_possible_json_value(self, value, def async_render_with_possible_json_value(self, value,
error_value=_SENTINEL): error_value=_SENTINEL):
"""Render template with value exposed. """Render template with value exposed.

View file

@ -78,7 +78,6 @@ async def async_million_events(hass):
@benchmark @benchmark
# pylint: disable=invalid-name
async def async_million_time_changed_helper(hass): async def async_million_time_changed_helper(hass):
"""Run a million events through time changed helper.""" """Run a million events through time changed helper."""
count = 0 count = 0
@ -109,7 +108,6 @@ async def async_million_time_changed_helper(hass):
@benchmark @benchmark
# pylint: disable=invalid-name
async def async_million_state_changed_helper(hass): async def async_million_state_changed_helper(hass):
"""Run a million events through state changed helper.""" """Run a million events through state changed helper."""
count = 0 count = 0

View file

@ -11,7 +11,6 @@
# too-few-* - same as too-many-* # too-few-* - same as too-many-*
# abstract-method - with intro of async there are always methods missing # abstract-method - with intro of async there are always methods missing
# inconsistent-return-statements - doesn't handle raise # 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 # not-an-iterable - https://github.com/PyCQA/pylint/issues/2311
disable= disable=
abstract-class-little-used, abstract-class-little-used,
@ -33,8 +32,7 @@ disable=
too-many-public-methods, too-many-public-methods,
too-many-return-statements, too-many-return-statements,
too-many-statements, too-many-statements,
unused-argument, unused-argument
useless-return
[REPORTS] [REPORTS]
reports=no reports=no

View file

@ -8,7 +8,7 @@ flake8==3.5
mock-open==1.3.1 mock-open==1.3.1
mypy==0.620 mypy==0.620
pydocstyle==1.1.1 pydocstyle==1.1.1
pylint==2.0.1 pylint==2.1.0
pytest-aiohttp==0.3.0 pytest-aiohttp==0.3.0
pytest-cov==2.5.1 pytest-cov==2.5.1
pytest-sugar==0.9.1 pytest-sugar==0.9.1

View file

@ -9,7 +9,7 @@ flake8==3.5
mock-open==1.3.1 mock-open==1.3.1
mypy==0.620 mypy==0.620
pydocstyle==1.1.1 pydocstyle==1.1.1
pylint==2.0.1 pylint==2.1.0
pytest-aiohttp==0.3.0 pytest-aiohttp==0.3.0
pytest-cov==2.5.1 pytest-cov==2.5.1
pytest-sugar==0.9.1 pytest-sugar==0.9.1