Skip to content

Commit

Permalink
Update dependencies and pre-commit hooks (#1755)
Browse files Browse the repository at this point in the history
* Update pre-commit hooks and run them against the whole codebase
* Relax development dependencies where there is no need for specific
version
* Update locked dependencies
  • Loading branch information
rytilahti committed Mar 7, 2023
1 parent 2e150a2 commit 79a3617
Show file tree
Hide file tree
Showing 9 changed files with 432 additions and 428 deletions.
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: check-ast

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
language_version: python3
Expand All @@ -27,6 +27,7 @@ repos:
rev: v1.1.1
hooks:
- id: doc8
additional_dependencies: [myst-parser]

- repo: https://github.com/myint/docformatter
rev: v1.5.1
Expand All @@ -48,7 +49,7 @@ repos:


- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
rev: v1.0.1
hooks:
- id: mypy
additional_dependencies: [types-attrs, types-PyYAML, types-requests, types-pytz, types-croniter, types-freezegun]
Expand Down
1 change: 0 additions & 1 deletion miio/click_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ def __init__(
result_callback_pass_device=True,
**attrs,
):

self.commands = getattr(device_class, "_device_group_commands", None)
if self.commands is None:
raise RuntimeError(
Expand Down
1 change: 0 additions & 1 deletion miio/integrations/huayi/light/huizuo.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ def __init__(
timeout: Optional[int] = None,
model: str = MODEL_HUIZUO_PIS123,
) -> None:

if model in MODELS_WITH_FAN_WY:
self.mapping.update(_ADDITIONAL_MAPPING_FAN_WY)
if model in MODELS_WITH_FAN_WY2:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ def send_configuration(
swing_mode: SwingMode,
led: Led,
):

prefix = str(model[0:2] + model[8:16])
suffix = model[-1:]

Expand Down
1 change: 0 additions & 1 deletion miio/integrations/lumi/gateway/devices/subdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def __init__(
dev_info: SubDeviceInfo,
model_info: Optional[Dict] = None,
) -> None:

self._gw = gw
self.sid = dev_info.sid
if model_info is None:
Expand Down
1 change: 0 additions & 1 deletion miio/tests/test_miotdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ def test_get_properties_for_mapping_readables(mocker, dev, props, included_in_re
dev.get_properties_for_mapping()

try:

req.assert_called_with(
expected_request, property_getter=ANY, max_properties=ANY
)
Expand Down
2 changes: 0 additions & 2 deletions miio/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def deprecated(reason):

string_types = (bytes, str)
if isinstance(reason, string_types):

# The @deprecated is used with a 'reason'.
#
# .. code-block:: python
Expand Down Expand Up @@ -45,7 +44,6 @@ def new_func1(*args, **kwargs):
return decorator

elif inspect.isclass(reason) or inspect.isfunction(reason): # noqa: SIM106

# The @deprecated is used without any 'reason'.
#
# .. code-block:: python
Expand Down

0 comments on commit 79a3617

Please sign in to comment.