pymammotion 0.4.0a8__tar.gz → 0.4.0a9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/PKG-INFO +2 -2
  2. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/aliyun/cloud_gateway.py +3 -7
  3. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/aliyun/model/aep_response.py +1 -2
  4. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/aliyun/model/dev_by_account_response.py +7 -8
  5. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/aliyun/model/login_by_oauth_response.py +2 -3
  6. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/aliyun/model/regions_response.py +3 -3
  7. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/aliyun/model/session_by_authcode_response.py +1 -2
  8. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/aliyun/model/stream_subscription_response.py +1 -2
  9. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/bluetooth/ble.py +1 -4
  10. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/bluetooth/ble_message.py +4 -7
  11. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/plan.py +0 -3
  12. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/raw_data.py +1 -2
  13. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/region_data.py +10 -11
  14. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/mqtt/properties.py +1 -1
  15. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/http/encryption.py +5 -6
  16. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/http/http.py +1 -6
  17. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/http/model/http.py +2 -2
  18. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/commands/messages/network.py +2 -2
  19. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/devices/base.py +3 -2
  20. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/devices/mammotion.py +4 -2
  21. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mqtt/linkkit/h2client.py +7 -4
  22. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mqtt/linkkit/linkkit.py +2 -2
  23. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pyproject.toml +56 -89
  24. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/LICENSE +0 -0
  25. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/README.md +0 -0
  26. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/__init__.py +0 -0
  27. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/aliyun/__init__.py +0 -0
  28. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/aliyun/model/connect_response.py +0 -0
  29. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/aliyun/tmp_constant.py +0 -0
  30. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/bluetooth/__init__.py +0 -0
  31. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/bluetooth/const.py +0 -0
  32. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/bluetooth/data/__init__.py +0 -0
  33. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/bluetooth/data/convert.py +0 -0
  34. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/bluetooth/data/framectrldata.py +0 -0
  35. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/bluetooth/data/notifydata.py +0 -0
  36. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/bluetooth/model/__init__.py +0 -0
  37. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/bluetooth/model/atomic_integer.py +0 -0
  38. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/const.py +0 -0
  39. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/__init__.py +0 -0
  40. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/__init__.py +0 -0
  41. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/account.py +0 -0
  42. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/device.py +0 -0
  43. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/device_config.py +0 -0
  44. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/device_info.py +0 -0
  45. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/device_limits.py +0 -0
  46. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/enums.py +0 -0
  47. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/excute_boarder_params.py +0 -0
  48. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/execute_boarder.py +0 -0
  49. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/generate_route_information.py +1 -1
  50. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/hash_list.py +0 -0
  51. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/location.py +0 -0
  52. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/mowing_modes.py +0 -0
  53. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/rapid_state.py +0 -0
  54. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/model/report_info.py +0 -0
  55. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/mqtt/__init__.py +0 -0
  56. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/mqtt/event.py +0 -0
  57. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/mqtt/status.py +0 -0
  58. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/data/state_manager.py +1 -1
  59. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/event/__init__.py +0 -0
  60. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/event/event.py +0 -0
  61. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/http/_init_.py +0 -0
  62. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/__init__.py +0 -0
  63. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/commands/__init__.py +0 -0
  64. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/commands/abstract_message.py +0 -0
  65. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/commands/mammotion_command.py +0 -0
  66. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/commands/messages/__init__.py +0 -0
  67. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/commands/messages/driver.py +1 -1
  68. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/commands/messages/media.py +0 -0
  69. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/commands/messages/navigation.py +1 -1
  70. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/commands/messages/ota.py +0 -0
  71. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/commands/messages/system.py +1 -1
  72. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/commands/messages/video.py +1 -1
  73. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/control/__init__.py +0 -0
  74. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/control/joystick.py +0 -0
  75. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/devices/__init__.py +0 -0
  76. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/devices/mammotion_bluetooth.py +0 -0
  77. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mammotion/devices/mammotion_cloud.py +3 -3
  78. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mqtt/__init__.py +0 -0
  79. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mqtt/linkkit/__init__.py +0 -0
  80. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mqtt/mammotion_future.py +0 -0
  81. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/mqtt/mammotion_mqtt.py +1 -1
  82. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/__init__.py +0 -0
  83. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/basestation.proto +0 -0
  84. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/basestation.py +0 -0
  85. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/basestation_pb2.py +0 -0
  86. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/basestation_pb2.pyi +0 -0
  87. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/common.proto +0 -0
  88. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/common.py +0 -0
  89. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/common_pb2.py +0 -0
  90. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/common_pb2.pyi +0 -0
  91. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/dev_net.proto +0 -0
  92. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/dev_net.py +0 -0
  93. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/dev_net_pb2.py +0 -0
  94. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/dev_net_pb2.pyi +0 -0
  95. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/luba_msg.proto +0 -0
  96. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/luba_msg.py +0 -0
  97. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/luba_msg_pb2.py +0 -0
  98. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/luba_msg_pb2.pyi +0 -0
  99. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/luba_mul.proto +0 -0
  100. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/luba_mul.py +0 -0
  101. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/luba_mul_pb2.py +0 -0
  102. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/luba_mul_pb2.pyi +0 -0
  103. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_driver.proto +0 -0
  104. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_driver.py +0 -0
  105. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_driver_pb2.py +0 -0
  106. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_driver_pb2.pyi +0 -0
  107. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_nav.proto +0 -0
  108. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_nav.py +0 -0
  109. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_nav_pb2.py +0 -0
  110. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_nav_pb2.pyi +0 -0
  111. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_ota.proto +0 -0
  112. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_ota.py +0 -0
  113. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_ota_pb2.py +0 -0
  114. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_ota_pb2.pyi +0 -0
  115. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_pept.proto +0 -0
  116. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_pept.py +0 -0
  117. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_pept_pb2.py +0 -0
  118. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_pept_pb2.pyi +0 -0
  119. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_sys.proto +0 -0
  120. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_sys.py +0 -0
  121. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_sys_pb2.py +0 -0
  122. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/proto/mctrl_sys_pb2.pyi +0 -0
  123. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/py.typed +0 -0
  124. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/utility/constant/__init__.py +0 -0
  125. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/utility/constant/device_constant.py +0 -0
  126. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/utility/conversions.py +0 -0
  127. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/utility/datatype_converter.py +0 -0
  128. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/utility/device_config.py +0 -0
  129. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/utility/device_type.py +0 -0
  130. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/utility/map.py +0 -0
  131. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/utility/movement.py +0 -0
  132. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/utility/periodic.py +0 -0
  133. {pymammotion-0.4.0a8 → pymammotion-0.4.0a9}/pymammotion/utility/rocker_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pymammotion
3
- Version: 0.4.0a8
3
+ Version: 0.4.0a9
4
4
  Summary:
5
5
  License: GPL-3.0
6
6
  Author: Michael Arthur
@@ -25,7 +25,7 @@ Requires-Dist: jsonic (>=1.0.0,<2.0.0)
25
25
  Requires-Dist: mashumaro (>=3.13,<4.0)
26
26
  Requires-Dist: numpy (>=1.26.0)
27
27
  Requires-Dist: orjson (>=3.9.15,<4.0.0)
28
- Requires-Dist: paho-mqtt (==2.1.0)
28
+ Requires-Dist: paho-mqtt (>=2.1.0,<3.0.0)
29
29
  Requires-Dist: protobuf (>=4.23.1)
30
30
  Requires-Dist: py-jsonic (>=0.0.2,<0.0.3)
31
31
  Description-Content-Type: text/markdown
@@ -5,11 +5,11 @@ import hashlib
5
5
  import hmac
6
6
  import itertools
7
7
  import json
8
+ from logging import getLogger
8
9
  import random
9
10
  import string
10
11
  import time
11
12
  import uuid
12
- from logging import getLogger
13
13
 
14
14
  from aiohttp import ClientSession
15
15
  from alibabacloud_iot_api_gateway.client import Client
@@ -19,14 +19,10 @@ from alibabacloud_tea_util.models import RuntimeOptions
19
19
 
20
20
  from pymammotion.aliyun.model.aep_response import AepResponse
21
21
  from pymammotion.aliyun.model.connect_response import ConnectResponse
22
- from pymammotion.aliyun.model.dev_by_account_response import (
23
- ListingDevByAccountResponse,
24
- )
22
+ from pymammotion.aliyun.model.dev_by_account_response import ListingDevByAccountResponse
25
23
  from pymammotion.aliyun.model.login_by_oauth_response import LoginByOAuthResponse
26
24
  from pymammotion.aliyun.model.regions_response import RegionResponse
27
- from pymammotion.aliyun.model.session_by_authcode_response import (
28
- SessionByAuthCodeResponse,
29
- )
25
+ from pymammotion.aliyun.model.session_by_authcode_response import SessionByAuthCodeResponse
30
26
  from pymammotion.const import ALIYUN_DOMAIN, APP_KEY, APP_SECRET, APP_VERSION
31
27
  from pymammotion.http.http import MammotionHTTP
32
28
  from pymammotion.utility.datatype_converter import DatatypeConverter
@@ -1,5 +1,4 @@
1
1
  from dataclasses import dataclass
2
- from typing import Optional
3
2
 
4
3
  from mashumaro.config import BaseConfig
5
4
  from mashumaro.mixins.orjson import DataClassORJSONMixin
@@ -16,7 +15,7 @@ class DeviceData(DataClassORJSONMixin):
16
15
  class AepResponse(DataClassORJSONMixin):
17
16
  code: int
18
17
  data: DeviceData
19
- id: Optional[str] = None
18
+ id: str | None = None
20
19
 
21
20
  class Config(BaseConfig):
22
21
  omit_default = True
@@ -1,5 +1,4 @@
1
1
  from dataclasses import dataclass
2
- from typing import Optional
3
2
 
4
3
  from mashumaro.config import BaseConfig
5
4
  from mashumaro.mixins.orjson import DataClassORJSONMixin
@@ -23,11 +22,11 @@ class Device(DataClassORJSONMixin):
23
22
  identityId: str
24
23
  thingType: str
25
24
  status: int
26
- nickName: Optional[str] = None
27
- description: Optional[str] = None
28
- productImage: Optional[str] = None
29
- categoryImage: Optional[str] = None
30
- productModel: Optional[str] = None
25
+ nickName: str | None = None
26
+ description: str | None = None
27
+ productImage: str | None = None
28
+ categoryImage: str | None = None
29
+ productModel: str | None = None
31
30
 
32
31
  class Config(BaseConfig):
33
32
  omit_default = True
@@ -44,5 +43,5 @@ class Data(DataClassORJSONMixin):
44
43
  @dataclass
45
44
  class ListingDevByAccountResponse(DataClassORJSONMixin):
46
45
  code: int
47
- data: Optional[Data]
48
- id: Optional[str] = None
46
+ data: Data | None
47
+ id: str | None = None
@@ -1,5 +1,4 @@
1
1
  from dataclasses import dataclass
2
- from typing import Optional
3
2
 
4
3
  from mashumaro.mixins.orjson import DataClassORJSONMixin
5
4
 
@@ -18,7 +17,7 @@ class OpenAccount(DataClassORJSONMixin):
18
17
  domainId: int
19
18
  enableDevice: str
20
19
  status: int
21
- country: Optional[str] = None
20
+ country: str | None = None
22
21
 
23
22
 
24
23
  @dataclass
@@ -54,7 +53,7 @@ class InnerData(DataClassORJSONMixin):
54
53
  subCode: int
55
54
  message: str
56
55
  successful: str
57
- deviceId: Optional[str] = None
56
+ deviceId: str | None = None
58
57
 
59
58
 
60
59
  @dataclass
@@ -1,5 +1,5 @@
1
1
  from dataclasses import dataclass
2
- from typing import Optional, TypeVar
2
+ from typing import TypeVar
3
3
 
4
4
  from mashumaro.config import BaseConfig
5
5
  from mashumaro.mixins.orjson import DataClassORJSONMixin
@@ -22,8 +22,8 @@ class RegionResponseData(DataClassORJSONMixin):
22
22
  class RegionResponse(DataClassORJSONMixin):
23
23
  data: RegionResponseData
24
24
  code: int
25
- id: Optional[str] = None
26
- msg: Optional[str] = None
25
+ id: str | None = None
26
+ msg: str | None = None
27
27
 
28
28
  class Config(BaseConfig):
29
29
  omit_default = True
@@ -1,5 +1,4 @@
1
1
  from dataclasses import dataclass
2
- from typing import Optional
3
2
 
4
3
  from mashumaro.mixins.orjson import DataClassORJSONMixin
5
4
 
@@ -16,4 +15,4 @@ class SessionOauthToken(DataClassORJSONMixin):
16
15
  @dataclass
17
16
  class SessionByAuthCodeResponse(DataClassORJSONMixin):
18
17
  code: int
19
- data: Optional[SessionOauthToken] = None
18
+ data: SessionOauthToken | None = None
@@ -1,5 +1,4 @@
1
1
  from dataclasses import dataclass
2
- from typing import List
3
2
 
4
3
  from mashumaro.mixins.orjson import DataClassORJSONMixin
5
4
 
@@ -13,7 +12,7 @@ class Camera(DataClassORJSONMixin):
13
12
  @dataclass
14
13
  class StreamSubscriptionResponse(DataClassORJSONMixin):
15
14
  appid: str
16
- cameras: List[Camera]
15
+ cameras: list[Camera]
17
16
  channelName: str
18
17
  token: str
19
18
  uid: int
@@ -1,10 +1,7 @@
1
1
  from bleak import BleakClient, BleakScanner, BLEDevice
2
2
  from bleak.backends.characteristic import BleakGATTCharacteristic
3
3
 
4
- from pymammotion.bluetooth.const import (
5
- SERVICE_CHANGED_CHARACTERISTIC,
6
- UUID_NOTIFICATION_CHARACTERISTIC,
7
- )
4
+ from pymammotion.bluetooth.const import SERVICE_CHANGED_CHARACTERISTIC, UUID_NOTIFICATION_CHARACTERISTIC
8
5
  from pymammotion.event.event import BleNotificationEvent
9
6
 
10
7
 
@@ -1,12 +1,11 @@
1
+ from asyncio import sleep
2
+ from io import BytesIO
1
3
  import itertools
2
4
  import json
3
5
  import logging
4
6
  import queue
5
7
  import sys
6
8
  import time
7
- from asyncio import sleep
8
- from io import BytesIO
9
- from typing import Union
10
9
 
11
10
  from bleak import BleakClient
12
11
  from jsonic.serializable import serialize
@@ -17,9 +16,7 @@ from pymammotion.bluetooth.data.framectrldata import FrameCtrlData
17
16
  from pymammotion.bluetooth.data.notifydata import BlufiNotifyData
18
17
  from pymammotion.bluetooth.model.atomic_integer import AtomicInteger
19
18
  from pymammotion.data.model.execute_boarder import ExecuteBorder
20
- from pymammotion.proto import (
21
- dev_net_pb2,
22
- )
19
+ from pymammotion.proto import dev_net_pb2
23
20
  from pymammotion.proto.luba_msg import LubaMsg, MsgAttr, MsgCmdType, MsgDevice
24
21
  from pymammotion.utility.constant.device_constant import bleOrderCmd
25
22
 
@@ -656,7 +653,7 @@ class BleMessage:
656
653
  return byteOS.getvalue()
657
654
 
658
655
  @staticmethod
659
- def calc_crc(initial: int, data: Union[bytes, bytearray]) -> int:
656
+ def calc_crc(initial: int, data: bytes | bytearray) -> int:
660
657
  """Calculate CRC value for given initial value and byte array.
661
658
 
662
659
  Args:
@@ -1,6 +1,3 @@
1
- from typing import List
2
-
3
-
4
1
  class Plan:
5
2
  def __init__(self) -> None:
6
3
  self.pver: int = 0
@@ -1,5 +1,4 @@
1
1
  from dataclasses import dataclass, field
2
- from typing import Optional
3
2
 
4
3
  from mashumaro.mixins.orjson import DataClassORJSONMixin
5
4
 
@@ -15,7 +14,7 @@ from pymammotion.proto.mctrl_sys import MctlSys
15
14
 
16
15
  @dataclass
17
16
  class RawMowerData:
18
- raw: Optional[LubaMsg] = field(default_factory=LubaMsg)
17
+ raw: LubaMsg | None = field(default_factory=LubaMsg)
19
18
 
20
19
  @classmethod
21
20
  def from_raw(cls, raw: dict) -> "RawMowerData":
@@ -1,5 +1,4 @@
1
1
  from dataclasses import dataclass
2
- from typing import Optional
3
2
 
4
3
  from mashumaro.mixins.orjson import DataClassORJSONMixin
5
4
 
@@ -7,14 +6,14 @@ from mashumaro.mixins.orjson import DataClassORJSONMixin
7
6
  @dataclass
8
7
  class RegionData(DataClassORJSONMixin):
9
8
  def __init__(self) -> None:
10
- self.hash: Optional[int] = None
9
+ self.hash: int | None = None
11
10
  self.action: int = 0
12
11
  self.current_frame: int = 0
13
- self.data_hash: Optional[int] = None
12
+ self.data_hash: int | None = None
14
13
  self.data_len: int = 0
15
- self.p_hash_a: Optional[int] = None
16
- self.p_hash_b: Optional[int] = None
17
- self.path: Optional[list[list[float]]] = None
14
+ self.p_hash_a: int | None = None
15
+ self.p_hash_b: int | None = None
16
+ self.path: list[list[float]] | None = None
18
17
  self.pver: int = 0
19
18
  self.result: int = 0
20
19
  self.sub_cmd: int = 0
@@ -72,31 +71,31 @@ class RegionData(DataClassORJSONMixin):
72
71
  def set_current_frame(self, current_frame: int) -> None:
73
72
  self.current_frame = current_frame
74
73
 
75
- def get_path(self) -> Optional[list[list[float]]]:
74
+ def get_path(self) -> list[list[float]] | None:
76
75
  return self.path
77
76
 
78
77
  def set_path(self, path: list[list[float]]) -> None:
79
78
  self.path = path
80
79
 
81
- def get_hash(self) -> Optional[int]:
80
+ def get_hash(self) -> int | None:
82
81
  return self.hash
83
82
 
84
83
  def set_data_hash(self, data_hash: int) -> None:
85
84
  self.data_hash = data_hash
86
85
 
87
- def get_data_hash(self) -> Optional[int]:
86
+ def get_data_hash(self) -> int | None:
88
87
  return self.data_hash
89
88
 
90
89
  def set_p_hash_a(self, p_hash_a: int) -> None:
91
90
  self.p_hash_a = p_hash_a
92
91
 
93
- def get_p_hash_a(self) -> Optional[int]:
92
+ def get_p_hash_a(self) -> int | None:
94
93
  return self.p_hash_a
95
94
 
96
95
  def set_p_hash_b(self, p_hash_b: int) -> None:
97
96
  self.p_hash_b = p_hash_b
98
97
 
99
- def get_p_hash_b(self) -> Optional[int]:
98
+ def get_p_hash_b(self) -> int | None:
100
99
  return self.p_hash_b
101
100
 
102
101
  def __str__(self) -> str:
@@ -116,7 +116,7 @@ Items = Union[
116
116
  @dataclass
117
117
  class Item:
118
118
  time: int
119
- value: Union[int, float, str, dict[str, Any]] # Depending on the type of value
119
+ value: int | float | str | dict[str, Any] # Depending on the type of value
120
120
 
121
121
 
122
122
  @dataclass
@@ -2,7 +2,6 @@ import base64
2
2
  import logging
3
3
  import secrets
4
4
  import string
5
- from typing import Optional
6
5
 
7
6
  from cryptography.hazmat.backends import default_backend
8
7
  from cryptography.hazmat.primitives import padding, serialization
@@ -50,7 +49,7 @@ class EncryptionUtils:
50
49
  private_key_bytes = base64.b64decode(EncryptionUtils.PRIVATE_KEY)
51
50
  return serialization.load_der_private_key(private_key_bytes, password=None, backend=default_backend())
52
51
  except Exception as e:
53
- raise Exception(f"Failed to load private key: {str(e)}")
52
+ raise Exception(f"Failed to load private key: {e!s}")
54
53
 
55
54
  @staticmethod
56
55
  def load_public_key(is_production: bool = True):
@@ -65,7 +64,7 @@ class EncryptionUtils:
65
64
  public_key_bytes = base64.b64decode(key_string)
66
65
  return serialization.load_der_public_key(public_key_bytes, backend=default_backend())
67
66
  except Exception as e:
68
- raise Exception(f"Failed to load public key: {str(e)}")
67
+ raise Exception(f"Failed to load public key: {e!s}")
69
68
 
70
69
  @staticmethod
71
70
  def encrypt(plaintext: str, key: str, iv: str) -> str:
@@ -104,7 +103,7 @@ class EncryptionUtils:
104
103
  return base64.b64encode(encrypted_bytes).decode("utf-8")
105
104
 
106
105
  except Exception as e:
107
- raise Exception(f"Encryption failed: {str(e)}")
106
+ raise Exception(f"Encryption failed: {e!s}")
108
107
 
109
108
  def encryption_by_aes(self, text: str) -> str:
110
109
  """Encrypt text using AES with class-level key and IV
@@ -123,10 +122,10 @@ class EncryptionUtils:
123
122
  return encrypted
124
123
 
125
124
  except Exception as e:
126
- _LOGGER.error(f"Encryption failed: {str(e)}")
125
+ _LOGGER.error(f"Encryption failed: {e!s}")
127
126
  return None
128
127
 
129
- def encrypt_by_public_key(self) -> Optional[str]:
128
+ def encrypt_by_public_key(self) -> str | None:
130
129
  """Encrypt data using RSA public key.
131
130
 
132
131
  Args:
@@ -4,12 +4,7 @@ from typing import cast
4
4
  from aiohttp import ClientSession
5
5
 
6
6
  from pymammotion.aliyun.model.stream_subscription_response import StreamSubscriptionResponse
7
- from pymammotion.const import (
8
- MAMMOTION_API_DOMAIN,
9
- MAMMOTION_CLIENT_ID,
10
- MAMMOTION_CLIENT_SECRET,
11
- MAMMOTION_DOMAIN,
12
- )
7
+ from pymammotion.const import MAMMOTION_API_DOMAIN, MAMMOTION_CLIENT_ID, MAMMOTION_CLIENT_SECRET, MAMMOTION_DOMAIN
13
8
  from pymammotion.http.encryption import EncryptionUtils
14
9
  from pymammotion.http.model.http import ErrorInfo, LoginResponseData, Response
15
10
 
@@ -1,5 +1,5 @@
1
1
  from dataclasses import dataclass
2
- from typing import Generic, Literal, Optional, TypeVar
2
+ from typing import Generic, Literal, TypeVar
3
3
 
4
4
  from mashumaro import DataClassDictMixin
5
5
  from mashumaro.config import BaseConfig
@@ -83,7 +83,7 @@ class LoginResponseUserInformation(DataClassORJSONMixin):
83
83
  userId: str
84
84
  userAccount: str
85
85
  authType: str
86
- email: Optional[str] = None
86
+ email: str | None = None
87
87
 
88
88
  class Config(BaseConfig):
89
89
  omit_none = True
@@ -1,6 +1,6 @@
1
1
  # === sendOrderMsg_Net ===
2
- import time
3
2
  from abc import ABC
3
+ import time
4
4
 
5
5
  from pymammotion import logger
6
6
  from pymammotion.mammotion.commands.abstract_message import AbstractMessage
@@ -193,7 +193,7 @@ class MessageNetwork(AbstractMessage, ABC):
193
193
  def wifi_connectinfo_update2(self) -> None:
194
194
  hash_map = {"getMsgCmd": 1}
195
195
  # self.post_custom_data(self.get_json_string(
196
- # 68, hash_map)) # ToDo: Fix this
196
+ # 68, hash_map)) # TODO: Fix this
197
197
 
198
198
  def get_record_wifi_list(self) -> bytes:
199
199
  build = DevNet(todev_ble_sync=1, todev__wifi_list_upload=DrvWifiList())
@@ -1,7 +1,8 @@
1
+ from abc import abstractmethod
1
2
  import asyncio
3
+ from collections.abc import Awaitable, Callable
2
4
  import logging
3
- from abc import abstractmethod
4
- from typing import Any, Awaitable, Callable
5
+ from typing import Any
5
6
 
6
7
  import betterproto
7
8
 
@@ -3,8 +3,8 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import asyncio
6
- import logging
7
6
  from enum import Enum
7
+ import logging
8
8
  from typing import Any
9
9
 
10
10
  from bleak.backends.device import BLEDevice
@@ -296,7 +296,9 @@ class Mammotion:
296
296
  device = self.get_device_by_name(name)
297
297
  if device.preference is ConnectionPreference.WIFI:
298
298
  if device.has_cloud():
299
- _stream_response = await device.cloud().mqtt.cloud_client.get_stream_subscription(device.cloud().iot_id)
299
+ _stream_response = await device.cloud().mqtt.cloud_client.mammotion_http.get_stream_subscription(
300
+ device.cloud().iot_id
301
+ )
300
302
  _LOGGER.debug(_stream_response)
301
303
  return _stream_response
302
304
 
@@ -24,11 +24,10 @@ import os
24
24
  import ssl
25
25
  import threading
26
26
  import time
27
+ from types import TracebackType
27
28
 
28
29
  import crcmod
29
30
  import hyper
30
- from types import TracebackType
31
- from typing import Optional, Type
32
31
 
33
32
 
34
33
  def _assert_value(condition, error_msg):
@@ -60,7 +59,9 @@ class StreamHandler:
60
59
  def __enter__(self) -> None:
61
60
  pass
62
61
 
63
- def __exit__(self, type: Optional[Type[BaseException]], value: Optional[BaseException], trace: Optional[TracebackType]) -> None:
62
+ def __exit__(
63
+ self, type: type[BaseException] | None, value: BaseException | None, trace: TracebackType | None
64
+ ) -> None:
64
65
  pass
65
66
 
66
67
  def get_content_length(self):
@@ -90,7 +91,9 @@ class FileStreamHandler(StreamHandler):
90
91
  self.__f = open(self.__filename, "rb")
91
92
  self.__read_size = 0
92
93
 
93
- def __exit__(self, type: Optional[Type[BaseException]], value: Optional[BaseException], trace: Optional[TracebackType]) -> None:
94
+ def __exit__(
95
+ self, type: type[BaseException] | None, value: BaseException | None, trace: TracebackType | None
96
+ ) -> None:
94
97
  if self.__f:
95
98
  self.__f.close()
96
99
  self.__f = None
@@ -16,6 +16,7 @@
16
16
  #
17
17
  #
18
18
 
19
+ from enum import Enum
19
20
  import hashlib
20
21
  import hmac
21
22
  import json
@@ -31,7 +32,6 @@ import threading
31
32
  import time
32
33
  import urllib.parse
33
34
  import urllib.request
34
- from enum import Enum
35
35
 
36
36
  import paho.mqtt.client as mqtt
37
37
  from paho.mqtt.enums import CallbackAPIVersion
@@ -1046,7 +1046,7 @@ UxeCp6
1046
1046
  raise LinkKit.StateError("not in INITIALIZED state")
1047
1047
  if port < 1 or port > 65535:
1048
1048
  raise ValueError("port wrong")
1049
- if protocol != "MQTTv311" and protocol != "MQTTv31":
1049
+ if protocol not in ("MQTTv311", "MQTTv31"):
1050
1050
  raise ValueError("protocol wrong")
1051
1051
  if transport != "TCP":
1052
1052
  raise ValueError("transport wrong")
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [project]
6
6
  name = "pymammotion"
7
- version = "0.4.0-alpha8"
7
+ version = "0.4.0-alpha9"
8
8
  license = "GPL-3.0"
9
9
  description = ""
10
10
  readme = "README.md"
@@ -26,7 +26,7 @@ bleak = ">=0.21.0"
26
26
  protobuf = ">=4.23.1"
27
27
  py-jsonic = "^0.0.2"
28
28
  aiohttp = "^3.9.1"
29
- paho-mqtt = "==2.1.0"
29
+ paho-mqtt = "^2.1.0"
30
30
  alicloud-gateway-iot = "^1.0.0"
31
31
  alibabacloud-apigateway-util = "^0.0.2"
32
32
  alibabacloud-iot-api-gateway = "^0.0.4"
@@ -65,7 +65,7 @@ mypy = "^1.11.2"
65
65
  autotyping = "^24.3.0"
66
66
 
67
67
  [tool.bumpver]
68
- current_version = "0.4.0-alpha8"
68
+ current_version = "0.4.0-alpha9"
69
69
  version_pattern = "MAJOR.MINOR.PATCH"
70
70
  commit_message = "Bump version {old_version} -> {new_version}"
71
71
  commit = true
@@ -83,9 +83,13 @@ push = false
83
83
  pymammotion = ["py.typed"]
84
84
 
85
85
 
86
- [tool.pylint.MAIN]
86
+ [tool.pylint]
87
87
  py-version = "3.12"
88
-
88
+ ignore = [
89
+ "tests",
90
+ "scripts",
91
+ "pymammotion/proto"
92
+ ]
89
93
  load-plugins = [
90
94
  "pylint.extensions.code_style",
91
95
  "pylint.extensions.typing"
@@ -356,11 +360,6 @@ enable = [
356
360
  #"useless-suppression", # temporarily every now and then to clean them up
357
361
  "use-symbolic-message-instead",
358
362
  ]
359
- per-file-ignores = [
360
- # hass-component-root-import: Tests test non-public APIs
361
- # redefined-outer-name: Tests reference fixtures in the test function
362
- "/tests/:hass-component-root-import,redefined-outer-name",
363
- ]
364
363
 
365
364
  [tool.pylint.REPORTS]
366
365
  score = false
@@ -378,7 +377,6 @@ expected-line-ending-format = "LF"
378
377
  overgeneral-exceptions = [
379
378
  "builtins.BaseException",
380
379
  "builtins.Exception",
381
- # "homeassistant.exceptions.HomeAssistantError", # too many issues
382
380
  ]
383
381
 
384
382
  [tool.pylint.TYPING]
@@ -390,84 +388,11 @@ max-line-length-suggestions = 120
390
388
 
391
389
  [tool.ruff]
392
390
  required-version = ">=0.4.3"
393
- exclude = ['pymammotion/proto/*', 'tests/*']
391
+ exclude = ['pymammotion/proto/*', 'tests/*', "scripts"]
394
392
  line-length = 120
395
393
 
396
394
  [tool.ruff.lint]
397
- select = [
398
- "A001", # Variable {name} is shadowing a Python builtin
399
- "B002", # Python does not support the unary prefix increment
400
- "B005", # Using .strip() with multi-character strings is misleading
401
- "B007", # Loop control variable {name} not used within loop body
402
- "B014", # Exception handler with duplicate exception
403
- "B015", # Pointless comparison. Did you mean to assign a value? Otherwise, prepend assert or remove it.
404
- "B017", # pytest.raises(BaseException) should be considered evil
405
- "B018", # Found useless attribute access. Either assign it to a variable or remove it.
406
- "B023", # Function definition does not bind loop variable {name}
407
- "B026", # Star-arg unpacking after a keyword argument is strongly discouraged
408
- "B032", # Possible unintentional type annotation (using :). Did you mean to assign (using =)?
409
- "B904", # Use raise from to specify exception cause
410
- "B905", # zip() without an explicit strict= parameter
411
- "BLE",
412
- "C", # complexity
413
- "COM818", # Trailing comma on bare tuple prohibited
414
- "D", # docstrings
415
- "DTZ003", # Use datetime.now(tz=) instead of datetime.utcnow()
416
- "DTZ004", # Use datetime.fromtimestamp(ts, tz=) instead of datetime.utcfromtimestamp(ts)
417
- "E", # pycodestyle
418
- "F", # pyflakes/autoflake
419
- "FLY", # flynt
420
- "G", # flake8-logging-format
421
- "I", # isort
422
- "INP", # flake8-no-pep420
423
- "ISC", # flake8-implicit-str-concat
424
- "ICN001", # import concentions; {name} should be imported as {asname}
425
- "LOG", # flake8-logging
426
- "N804", # First argument of a class method should be named cls
427
- "N805", # First argument of a method should be named self
428
- "N815", # Variable {name} in class scope should not be mixedCase
429
- "PERF", # Perflint
430
- "PGH", # pygrep-hooks
431
- "PIE", # flake8-pie
432
- "PL", # pylint
433
- "PT", # flake8-pytest-style
434
- "PYI", # flake8-pyi
435
- "RET", # flake8-return
436
- "RSE", # flake8-raise
437
- "RUF005", # Consider iterable unpacking instead of concatenation
438
- "RUF006", # Store a reference to the return value of asyncio.create_task
439
- "RUF013", # PEP 484 prohibits implicit Optional
440
- "RUF018", # Avoid assignment expressions in assert statements
441
- "RUF019", # Unnecessary key check before dictionary access
442
- # "RUF100", # Unused `noqa` directive; temporarily every now and then to clean them up
443
- "S102", # Use of exec detected
444
- "S103", # bad-file-permissions
445
- "S108", # hardcoded-temp-file
446
- "S306", # suspicious-mktemp-usage
447
- "S307", # suspicious-eval-usage
448
- "S313", # suspicious-xmlc-element-tree-usage
449
- "S314", # suspicious-xml-element-tree-usage
450
- "S315", # suspicious-xml-expat-reader-usage
451
- "S316", # suspicious-xml-expat-builder-usage
452
- "S317", # suspicious-xml-sax-usage
453
- "S318", # suspicious-xml-mini-dom-usage
454
- "S319", # suspicious-xml-pull-dom-usage
455
- "S320", # suspicious-xmle-tree-usage
456
- "S601", # paramiko-call
457
- "S602", # subprocess-popen-with-shell-equals-true
458
- "S604", # call-with-shell-equals-true
459
- "S608", # hardcoded-sql-expression
460
- "S609", # unix-command-wildcard-injection
461
- "SIM", # flake8-simplify
462
- "SLF", # flake8-self
463
- "SLOT", # flake8-slots
464
- "T100", # Trace found: {name} used
465
- "T20", # flake8-print
466
- "TID251", # Banned imports
467
- "TRY", # tryceratops
468
- "UP", # pyupgrade
469
- "W", # pycodestyle
470
- ]
395
+ select = ["ALL"]
471
396
 
472
397
  ignore = [
473
398
  "D202", # No blank lines allowed after function docstring
@@ -510,9 +435,7 @@ ignore = [
510
435
  "D206",
511
436
  "D300",
512
437
  "Q",
513
- "COM812",
514
438
  "COM819",
515
- "ISC001",
516
439
 
517
440
  # Disabled because ruff does not understand type of __all__ generated by a function
518
441
  "PLE0605",
@@ -524,5 +447,49 @@ ignore = [
524
447
  "RET502",
525
448
  "RET501",
526
449
  "TRY002",
527
- "TRY301"
450
+ "TRY301",
451
+ "ANN401", # Opinioated warning on disallowing dynamically typed expressions
452
+ "COM812", # Conflicts with formatter
453
+ "D203", # Conflicts with other rules
454
+ "D417", # False positives in some occasions
455
+ "ISC001", # Conflicts with formatter
528
456
  ]
457
+
458
+ [tool.ruff.lint.isort]
459
+ known-first-party = ["pymammotion"]
460
+ force-sort-within-sections = true
461
+ split-on-trailing-comma = false
462
+ combine-as-imports = true
463
+
464
+ [tool.ruff.lint.mccabe]
465
+ max-complexity = 25
466
+
467
+ [tool.mypy]
468
+ # Specify the target platform details in config, so your developers are
469
+ # free to run mypy on Windows, Linux, or macOS and get consistent
470
+ # results.
471
+ platform = "linux"
472
+ python_version = "3.12"
473
+
474
+ # show error messages from unrelated files
475
+ follow_imports = "normal"
476
+
477
+ # suppress errors about unsatisfied imports
478
+ ignore_missing_imports = true
479
+
480
+ # be strict
481
+ check_untyped_defs = true
482
+ disallow_any_generics = true
483
+ disallow_incomplete_defs = true
484
+ disallow_subclassing_any = true
485
+ disallow_untyped_calls = true
486
+ disallow_untyped_decorators = true
487
+ disallow_untyped_defs = true
488
+ no_implicit_optional = true
489
+ strict_optional = true
490
+ warn_incomplete_stub = true
491
+ warn_no_return = true
492
+ warn_redundant_casts = true
493
+ warn_return_any = true
494
+ warn_unused_configs = true
495
+ warn_unused_ignores = true
File without changes
File without changes
@@ -1,5 +1,5 @@
1
- import logging
2
1
  from dataclasses import dataclass
2
+ import logging
3
3
 
4
4
  logger = logging.getLogger(__name__)
5
5
 
@@ -1,8 +1,8 @@
1
1
  """Manage state from notifications into MowingDevice."""
2
2
 
3
- import logging
4
3
  from collections.abc import Awaitable, Callable
5
4
  from datetime import datetime
5
+ import logging
6
6
  from typing import Any
7
7
 
8
8
  import betterproto
@@ -1,7 +1,7 @@
1
1
  # === sendOrderMsg_Driver ===
2
- import time
3
2
  from abc import ABC
4
3
  from logging import getLogger
4
+ import time
5
5
 
6
6
  from pymammotion.mammotion.commands.abstract_message import AbstractMessage
7
7
  from pymammotion.proto import mctrl_driver
@@ -1,7 +1,7 @@
1
1
  # === sendOrderMsg_Nav ===
2
+ from abc import ABC
2
3
  import logging
3
4
  import time
4
- from abc import ABC
5
5
 
6
6
  from pymammotion.data.model import GenerateRouteInformation
7
7
  from pymammotion.data.model.plan import Plan
@@ -1,7 +1,7 @@
1
1
  # === sendOrderMsg_Sys ===
2
+ from abc import ABC
2
3
  import datetime
3
4
  import time
4
- from abc import ABC
5
5
 
6
6
  from pymammotion import logger
7
7
  from pymammotion.mammotion.commands.abstract_message import AbstractMessage
@@ -1,6 +1,6 @@
1
1
  # === sendOrderMsg_Video ===
2
- import time
3
2
  from abc import ABC
3
+ import time
4
4
 
5
5
  from pymammotion.mammotion.commands.abstract_message import AbstractMessage
6
6
  from pymammotion.proto import luba_msg_pb2, luba_mul_pb2
@@ -1,10 +1,10 @@
1
1
  import asyncio
2
- import base64
3
- import json
4
- import logging
5
2
  from asyncio import TimerHandle
3
+ import base64
6
4
  from collections import deque
7
5
  from collections.abc import Awaitable, Callable
6
+ import json
7
+ import logging
8
8
  from typing import Any, cast
9
9
 
10
10
  import betterproto
@@ -2,11 +2,11 @@
2
2
 
3
3
  import asyncio
4
4
  import base64
5
+ from collections.abc import Awaitable, Callable
5
6
  import hashlib
6
7
  import hmac
7
8
  import json
8
9
  import logging
9
- from collections.abc import Awaitable, Callable
10
10
  from logging import getLogger
11
11
 
12
12
  import betterproto