Skip to content

Commit

Permalink
Update pydevccu, extend ruff usage (#1454)
Browse files Browse the repository at this point in the history
  • Loading branch information
SukramJ authored Mar 6, 2024
1 parent 29d5782 commit 81a9a1c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,9 @@ lint.select = [
"N804", # First argument of a class method should be named cls
"N805", # First argument of a method should be named self
"N815", # Variable {name} in class scope should not be mixedCase
"PERF101", # Do not cast an iterable to list before iterating over it
"PERF102", # When using only the {subset} of a dict use the {subset}() method
"PERF203", # try-except within a loop incurs performance overhead
"PGH004", # Use specific rule codes when using noqa
"PLC", # pylint
"PLC0414", # Useless import alias. Import alias does not rename original package.
Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ freezegun==1.4.0
mypy==1.8.0
pip==24.0
pre-commit==3.6.2
pydevccu==0.1.7
pydevccu==0.1.8
pylint-per-file-ignores==1.3.2
pylint-strict-informational==0.1
pylint==3.1.0
Expand Down
14 changes: 7 additions & 7 deletions tests/test_central_pydevccu.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,22 @@ async def test_central_full(central_unit_full) -> None:
) as fptr:
fptr.write(orjson.dumps(addresses, option=orjson.OPT_INDENT_2 | orjson.OPT_NON_STR_KEYS))

assert usage_types[EntityUsage.NO_CREATE] == 3086
assert usage_types[EntityUsage.CE_PRIMARY] == 189
assert usage_types[EntityUsage.ENTITY] == 3719
assert usage_types[EntityUsage.NO_CREATE] == 3134
assert usage_types[EntityUsage.CE_PRIMARY] == 194
assert usage_types[EntityUsage.ENTITY] == 3787
assert usage_types[EntityUsage.CE_VISIBLE] == 102
assert usage_types[EntityUsage.CE_SECONDARY] == 146

assert len(ce_channels) == 116
assert len(ce_channels) == 118
assert len(entity_types) == 6
assert len(parameters) == 190
assert len(parameters) == 215

assert len(central_unit_full._devices) == 379
assert len(central_unit_full._devices) == 383
virtual_remotes = ["VCU4264293", "VCU0000057", "VCU0000001"]
await central_unit_full.delete_devices(
interface_id=const.INTERFACE_ID, addresses=virtual_remotes
)
assert len(central_unit_full._devices) == 376
assert len(central_unit_full._devices) == 380
del_addresses = list(
central_unit_full.device_descriptions.get_device_descriptions(const.INTERFACE_ID)
)
Expand Down

0 comments on commit 81a9a1c

Please sign in to comment.