Compare commits

..

4 Commits

Author SHA1 Message Date
Andre Basche
715d8a96fc Set versions of dependant packages to 'compatible releases' 2023-07-27 19:14:19 +02:00
Andre Basche
ec358034e1 Bump version 2023-07-22 11:48:47 +02:00
Andre Basche
6cdac99ce8 Not loading favorite if base program renamed 2023-07-22 11:48:40 +02:00
Andre Basche
0c1670733f Update requirements 2023-07-22 11:24:27 +02:00
3 changed files with 13 additions and 12 deletions

View File

@ -187,18 +187,19 @@ class HonCommandLoader:
command = favourite.get("command", {})
command_name = command.get("commandName", "")
program_name = self._clean_name(command.get("programName", ""))
base: HonCommand = copy(
self.commands[command_name].categories[program_name]
)
if not (base := self.commands[command_name].categories.get(program_name)):
continue
base_command: HonCommand = copy(base)
for data in command.values():
if isinstance(data, str):
continue
for key, value in data.items():
if parameter := base.parameters.get(key):
if parameter := base_command.parameters.get(key):
with suppress(ValueError):
parameter.value = value
extra_param = HonParameterFixed("favourite", {"fixedValue": "1"}, "custom")
base.parameters.update(favourite=extra_param)
if isinstance(program := base.parameters["program"], HonParameterProgram):
base_command.parameters.update(favourite=extra_param)
program = base_command.parameters["program"]
if isinstance(program, HonParameterProgram):
program.set_value(name)
self.commands[command_name].categories[name] = base
self.commands[command_name].categories[name] = base_command

View File

@ -1,3 +1,3 @@
aiohttp==3.8.4
yarl==1.8.2
typing-extensions==4.7.1
aiohttp~=3.8.5
yarl~=1.9.2
typing-extensions~=4.7.1

View File

@ -7,7 +7,7 @@ with open("README.md", "r") as f:
setup(
name="pyhOn",
version="0.14.10",
version="0.14.12",
author="Andre Basche",
description="Control hOn devices with python",
long_description=long_description,
@ -21,7 +21,7 @@ setup(
packages=find_packages(),
include_package_data=True,
python_requires=">=3.10",
install_requires=["aiohttp==3.8.4", "typing-extensions==4.7.1"],
install_requires=["aiohttp~=3.8.5", "typing-extensions~=4.7.1", "yarl~=1.9.2"],
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Console",