Skip to content

Commit 7bf6aaa

Browse files
author
Marc Hofmann
committed
removed warnings
1 parent 6967caf commit 7bf6aaa

File tree

3 files changed

+6
-77
lines changed

3 files changed

+6
-77
lines changed

.pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ max-attributes=15
44

55
[DESIGN]
66
max-statements=100
7+
max-locals = 20
78

89
[STRING]
910
check-quote-consistency=yes

src/__main__.py

Lines changed: 2 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
"""Test program how to use library without installing the library,
22
DO NOT USE THIS FILE, USE EXAMPLES INSTEAD"""
33

4-
import struct
54
import sys
65
import asyncio
76

87
from science_mode_4.device_i24 import DeviceI24
9-
from science_mode_4.dyscom.dyscom_get_operation_mode import PacketDyscomGetAckOperationMode
10-
from science_mode_4.dyscom.dyscom_send_file import PacketDyscomSendFile
11-
from science_mode_4.dyscom.dyscom_types import DyscomFilterType, DyscomGetType, DyscomInitFlag, DyscomInitParams, DyscomPowerModulePowerType, DyscomPowerModuleType, DyscomSignalType
12-
from science_mode_4.protocol.commands import Commands
8+
from science_mode_4.dyscom.dyscom_types import DyscomFilterType, DyscomInitFlag, DyscomInitParams, DyscomPowerModulePowerType,\
9+
DyscomPowerModuleType, DyscomSignalType
1310
from science_mode_4.utils.serial_port_connection import SerialPortConnection
1411

1512

@@ -69,73 +66,3 @@ async def main() -> int:
6966
if __name__ == "__main__":
7067
res = asyncio.run(main())
7168
sys.exit(res)
72-
73-
74-
# init
75-
# 00 00 00 00 00 00 00 00 83 00 FC 00 00 00 00 00 00 00 00 00
76-
# 00 EA EA 02 00 00 12 00 0A 0E 06 13 02 00 A0 00 7D 12 00 0A
77-
# 0E 06 13 02 00 A0 00 7D 00 00 00 00 00 00 00 00 00 00 00 00
78-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
79-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
81-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
82-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
83-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
84-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
85-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
86-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
87-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
88-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
89-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
91-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
92-
# 00 00 00 00 02 00 00 00 00 02 03 00 00 00 00 00 00 00 00 00
93-
# 02
94-
95-
96-
# 01 03 00 04 00 00 00 00 00 00 02 03 04 00 00 00 00 00 00 00
97-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
98-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
99-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
100-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
101-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
102-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
103-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
104-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
105-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
106-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
107-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
108-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
109-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
110-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
111-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
112-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
113-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
114-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
115-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
116-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
117-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
118-
# 00 00 00 00 00 00 00 00 83 00 fc 00 00 00 00 00 00 00 00 00
119-
# 02 ea 00 00 00 00 00 00 00 ea 00 00 00 00 00 00 00 00 00 00
120-
# 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
121-
# 00 00 00 00 00 00 00 00 00 00 00 00
122-
123-
# 00 00 00 00 50 72 08 41 c0 39 ff bd
124-
# fa 00 00 00 75 a0 09 41 e0 4e f3 bd
125-
# fa 00 00 00 c9 b7 0c 41 e0 45 e8 bd
126-
# fb 00 00 00 56 c7 0e 41 a0 06 de bd
127-
# fa 00 00 00 32 45 11 41 e0 78 d4 bd
128-
# fa 00 00 00 fa 37 13 41 15 90 cb bd
129-
# fa 00 00 00 24 4e 14 41 a0 33 c3 bd
130-
# fb 00 00 00 87 1d 17 41 60 5a bb bd
131-
# f9 00 00 00 d1 8e 18 41 d5 f9 b3 bd
132-
# fa 00 00 00 4a 28 19 41 60 04 ad bd
133-
# fa 00 00 00 2a a3 1a 41 eb 74 a6 bd
134-
# fb 00 00 00 cd 52 1c 41 c0 40 a0 bd
135-
# f9 00 00 00 dc f5 1c 41 a0 60 9a bd
136-
# fa 00 00 00 0c f4 1d 41 75 d1 94 bd
137-
# fa 00 00 00 5b 4d 1f 41 00 8d 8f bd
138-
# fa 00 00 00 e8 71 20 41 ab 8b 8a bd
139-
# fa 00 00 00 4c 6b 21 41 f5 cc 85 bd
140-
# fa 00 00 00 90 09 22 41 2b 4a 81 bd
141-
# fa 00 00 00 2c e6 22 41 eb fa 79 bd

src/science_mode_4/dyscom/dyscom_layer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
from science_mode_4.layer import Layer
77
from science_mode_4.protocol.commands import Commands
88
from science_mode_4.utils.logger import logger
9-
from .dyscom_types import DyscomFrequencyOut, DyscomGetOperationModeType, DyscomPowerModuleType, DyscomPowerModulePowerType, DyscomSignalType, DyscomSysType
9+
from .dyscom_types import DyscomFrequencyOut, DyscomGetOperationModeType, DyscomPowerModuleType,\
10+
DyscomPowerModulePowerType, DyscomSignalType, DyscomSysType
1011
from .dyscom_init import DyscomInitResult, PacketDyscomInit, PacketDyscomInitAck, DyscomInitParams
1112
from .dyscom_get_file_system_status import PacketDyscomGetFileSystemStatus, PacketDyscomGetAckFileSystemStatus,\
1213
DyscomGetFileSystemStatusResult
@@ -189,7 +190,7 @@ async def get_file_content(self, filename: str) -> bytes:
189190
# we need number of blocks to know how many SendFile commands we expect
190191
# and filesize to know exact filesize
191192
file_by_name = await self.get_file_by_name(filename)
192-
logger().info("Dyscom get file content, filesize: %d, number of blocks: %d",
193+
logger().info("Dyscom get file content, filesize: %d, number of blocks: %d",
193194
file_by_name.filesize, file_by_name.number_of_blocks)
194195

195196
# start measurement, so device send automatically SendFile packets

0 commit comments

Comments
 (0)