Skip to content

Commit 71914e3

Browse files
committed
Fix python linter
Signed-off-by: Denisa <[email protected]>
1 parent 5662215 commit 71914e3

File tree

3 files changed

+89
-63
lines changed

3 files changed

+89
-63
lines changed

fastddsspy_tool/test/application/test_cases/tool_help.py

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -37,35 +37,48 @@ def __init__(self):
3737
arguments_dds=[],
3838
arguments_spy=[],
3939
commands_spy=['help'],
40-
output="""Fast DDS Spy is an interactive CLI that allow to instrospect DDS networks.\n\n\
41-
Each command shows data related with the network in Yaml format.\n\n\
42-
Commands available and the information they show:\n\n\
43-
\thelp : this help.\n\n\
44-
\tversion : tool version.\n\n\
45-
\tquit : exit interactive CLI and close program.\n\n\
46-
\tparticipants : DomainParticipants discovered in the network.\n\n\
47-
\tparticipants verbose : verbose information about DomainParticipants discovered in the network.\n\n\
48-
\tparticipants <Guid> : verbose information related with a specific DomainParticipant.\n\n\
49-
\twriters : DataWriters discovered in the network.\n\n\
50-
\twriters verbose : verbose information about DataWriters discovered in the network.\n\n\
51-
\twriters <Guid> : verbose information related with a specific DataWriter.\n\n\
52-
\treader : DataReaders discovered in the network.\n\n\
53-
\treader verbose : verbose information about DataReaders discovered in the network.\n\n\
54-
\treader <Guid> : verbose information related with a specific DataReader.\n\n\
55-
\ttopics : Topics discovered in the network in compact format.\n\n\
56-
\ttopics v : Topics discovered in the network.\n\n\
57-
\ttopics vv : verbose information about Topics discovered in the network.\n\n\
58-
\ttopics <name> : Topics discovered in the network filtered by name (wildcard allowed (*)).\n\n\
59-
\techo <name> : data of a specific Topic (Data Type must be discovered).\n\n\
60-
\techo <wildcard_name> : data of Topics matching the wildcard name (and whose Data Type is discovered).\n\n\
61-
\techo <name> verbose : data with additional source info of a specific Topic.\n\n\
62-
\techo <wildcard_name> verbose : data with additional source info of Topics matching the topic name (wildcard allowed (*)).\n\n\
63-
\techo all : verbose data of all topics (only those whose Data Type is discovered).\n\n\
64-
\n\n\
65-
Notes and comments:\n\n\
66-
\tTo exit from data printing, press enter.\n\n\
67-
\tEach command is accessible by using its first letter (h/v/q/p/w/r/t/s).\n\n\
68-
\n\n\
69-
For more information about these commands and formats, please refer to the documentation:\n\n\
70-
https://fast-dds-spy.readthedocs.io/en/latest/\n"""
40+
output = (
41+
"Fast DDS Spy is an interactive CLI that allow to instrospect DDS networks.\n\n"
42+
"Each command shows data related with the network in Yaml format.\n\n"
43+
"Commands available and the information they show:\n\n"
44+
"\thelp : this help.\n\n"
45+
"\tversion : tool version.\n\n"
46+
"\tquit : exit interactive CLI and close program.\n\n"
47+
"\tparticipants : DomainParticipants discovered in the network.\n\n"
48+
"\tparticipants verbose : verbose information about DomainParticipants "
49+
"discovered in the network.\n\n"
50+
"\tparticipants <Guid> : verbose information related with a specific "
51+
"DomainParticipant.\n\n"
52+
"\twriters : DataWriters discovered in the network.\n\n"
53+
"\twriters verbose : verbose information about DataWriters discovered "
54+
"in the network.\n\n"
55+
"\twriters <Guid> : verbose information related with a specific "
56+
"DataWriter.\n\n"
57+
"\treader : DataReaders discovered in the network.\n\n"
58+
"\treader verbose : verbose information about DataReaders discovered "
59+
"in the network.\n\n"
60+
"\treader <Guid> : verbose information related with a specific "
61+
"DataReader.\n\n"
62+
"\ttopics : Topics discovered in the network in compact format.\n\n"
63+
"\ttopics v : Topics discovered in the network.\n\n"
64+
"\ttopics vv : verbose information about Topics discovered "
65+
"in the network.\n\n"
66+
"\ttopics <name> : Topics discovered in the network filtered by name "
67+
"(wildcard allowed (*)).\n\n"
68+
"\techo <name> : data of a specific Topic (Data Type must be discovered).\n\n"
69+
"\techo <wildcard_name> : data of Topics matching the wildcard name "
70+
"(and whose Data Type is discovered).\n\n"
71+
"\techo <name> verbose : data with additional source info of a specific Topic.\n\n"
72+
"\techo <wildcard_name> verbose : data with additional source info of Topics matching the "
73+
"topic name (wildcard allowed (*)).\n\n"
74+
"\techo all : verbose data of all topics (only those whose "
75+
"Data Type is discovered).\n\n"
76+
"\n\n"
77+
"Notes and comments:\n\n"
78+
"\tTo exit from data printing, press enter.\n\n"
79+
"\tEach command is accessible by using its first letter (h/v/q/p/w/r/t/s).\n\n"
80+
"\n\n"
81+
"For more information about these commands and formats, please refer to the documentation:\n\n"
82+
"https://fast-dds-spy.readthedocs.io/en/latest/\n"
83+
)
7184
)

fastddsspy_tool/test/application/test_cases/tool_help_dds.py

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -40,35 +40,49 @@ def __init__(self):
4040
arguments_dds=[],
4141
arguments_spy=['--config-path', 'configuration'],
4242
commands_spy=['help'],
43-
output="""Fast DDS Spy is an interactive CLI that allow to instrospect DDS networks.\n\n\
44-
Each command shows data related with the network in Yaml format.\n\n\
45-
Commands available and the information they show:\n\n\
46-
\thelp : this help.\n\n\
47-
\tversion : tool version.\n\n\
48-
\tquit : exit interactive CLI and close program.\n\n\
49-
\tparticipants : DomainParticipants discovered in the network.\n\n\
50-
\tparticipants verbose : verbose information about DomainParticipants discovered in the network.\n\n\
51-
\tparticipants <Guid> : verbose information related with a specific DomainParticipant.\n\n\
52-
\twriters : DataWriters discovered in the network.\n\n\
53-
\twriters verbose : verbose information about DataWriters discovered in the network.\n\n\
54-
\twriters <Guid> : verbose information related with a specific DataWriter.\n\n\
55-
\treader : DataReaders discovered in the network.\n\n\
56-
\treader verbose : verbose information about DataReaders discovered in the network.\n\n\
57-
\treader <Guid> : verbose information related with a specific DataReader.\n\n\
58-
\ttopics : Topics discovered in the network in compact format.\n\n\
59-
\ttopics v : Topics discovered in the network.\n\n\
60-
\ttopics vv : verbose information about Topics discovered in the network.\n\n\
61-
\ttopics <name> : Topics discovered in the network filtered by name (wildcard allowed (*)).\n\n\
62-
\techo <name> : data of a specific Topic (Data Type must be discovered).\n\n\
63-
\techo <wildcard_name> : data of Topics matching the wildcard name (and whose Data Type is discovered).\n\n\
64-
\techo <name> verbose : data with additional source info of a specific Topic.\n\n\
65-
\techo <wildcard_name> verbose : data with additional source info of Topics matching the topic name (wildcard allowed (*)).\n\n\
66-
\techo all : verbose data of all topics (only those whose Data Type is discovered).\n\n\
67-
\n\n\
68-
Notes and comments:\n\n\
69-
\tTo exit from data printing, press enter.\n\n\
70-
\tEach command is accessible by using its first letter (h/v/q/p/w/r/t/s).\n\n\
71-
\n\n\
72-
For more information about these commands and formats, please refer to the documentation:\n\n\
73-
https://fast-dds-spy.readthedocs.io/en/latest/\n"""
43+
output = (
44+
"Fast DDS Spy is an interactive CLI that allow to instrospect DDS networks.\n\n"
45+
"Each command shows data related with the network in Yaml format.\n\n"
46+
"Commands available and the information they show:\n\n"
47+
"\thelp : this help.\n\n"
48+
"\tversion : tool version.\n\n"
49+
"\tquit : exit interactive CLI and close program.\n\n"
50+
"\tparticipants : DomainParticipants discovered in the network.\n\n"
51+
"\tparticipants verbose : verbose information about DomainParticipants "
52+
"discovered in the network.\n\n"
53+
"\tparticipants <Guid> : verbose information related with a specific "
54+
"DomainParticipant.\n\n"
55+
"\twriters : DataWriters discovered in the network.\n\n"
56+
"\twriters verbose : verbose information about DataWriters discovered "
57+
"in the network.\n\n"
58+
"\twriters <Guid> : verbose information related with a specific "
59+
"DataWriter.\n\n"
60+
"\treader : DataReaders discovered in the network.\n\n"
61+
"\treader verbose : verbose information about DataReaders discovered "
62+
"in the network.\n\n"
63+
"\treader <Guid> : verbose information related with a specific "
64+
"DataReader.\n\n"
65+
"\ttopics : Topics discovered in the network in compact format.\n\n"
66+
"\ttopics v : Topics discovered in the network.\n\n"
67+
"\ttopics vv : verbose information about Topics discovered "
68+
"in the network.\n\n"
69+
"\ttopics <name> : Topics discovered in the network filtered by name "
70+
"(wildcard allowed (*)).\n\n"
71+
"\techo <name> : data of a specific Topic (Data Type must be discovered).\n\n"
72+
"\techo <wildcard_name> : data of Topics matching the wildcard name "
73+
"(and whose Data Type is discovered).\n\n"
74+
"\techo <name> verbose : data with additional source info of a specific Topic.\n\n"
75+
"\techo <wildcard_name> verbose : data with additional source info of Topics matching the "
76+
"topic name (wildcard allowed (*)).\n\n"
77+
"\techo all : verbose data of all topics (only those whose "
78+
"Data Type is discovered).\n\n"
79+
"\n\n"
80+
"Notes and comments:\n\n"
81+
"\tTo exit from data printing, press enter.\n\n"
82+
"\tEach command is accessible by using its first letter (h/v/q/p/w/r/t/s).\n\n"
83+
"\n\n"
84+
"For more information about these commands and formats, please refer to the documentation:\n\n"
85+
"https://fast-dds-spy.readthedocs.io/en/latest/\n"
86+
)
87+
7488
)

fastddsspy_tool/test/application/test_class.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ def valid_rate(self, rate) -> bool:
179179
print(rate)
180180
return False
181181

182-
183182
def extract_cli_output(self, output: str) -> str:
184183
# Remove ANSI escape sequences
185184
ansi_escape = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]')

0 commit comments

Comments
 (0)