Skip to content

Commit 895e8c4

Browse files
author
1138-4EB
committed
lint: run new release of 'black'
1 parent edc7609 commit 895e8c4

8 files changed

Lines changed: 48 additions & 38 deletions

vunit/check_preprocessor.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ def run(self, code, file_name): # pylint: disable=unused-argument
3838
check_relation_calls.reverse()
3939

4040
for match in check_relation_calls:
41-
relation, offset_to_point_before_closing_paranthesis = self._extract_relation(
42-
code, match
43-
)
41+
(
42+
relation,
43+
offset_to_point_before_closing_paranthesis,
44+
) = self._extract_relation(code, match)
4445
if relation:
4546
context_msg_parameter = (
4647
", context_msg => %s" % relation.make_context_msg()

vunit/com/codec_vhdl_package.py

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ def generate_codecs_and_support_functions(self):
5757
definitions = ""
5858

5959
# Record
60-
new_declarations, new_definitions = (
61-
self._generate_record_codec_and_to_string_functions()
62-
)
60+
(
61+
new_declarations,
62+
new_definitions,
63+
) = self._generate_record_codec_and_to_string_functions()
6364
declarations += new_declarations
6465
definitions += new_definitions
6566

@@ -72,9 +73,10 @@ def generate_codecs_and_support_functions(self):
7273
definitions += new_definitions
7374

7475
# Enumerations
75-
all_msg_types_enumeration_type, msg_type_enumeration_types = (
76-
self._create_enumeration_of_all_msg_types()
77-
)
76+
(
77+
all_msg_types_enumeration_type,
78+
msg_type_enumeration_types,
79+
) = self._create_enumeration_of_all_msg_types()
7880
if all_msg_types_enumeration_type is not None:
7981
declarations += self._template.all_msg_types_enumeration_type_declaration.substitute(
8082
identifier=all_msg_types_enumeration_type.identifier,
@@ -89,16 +91,20 @@ def generate_codecs_and_support_functions(self):
8991
type=all_msg_types_enumeration_type.identifier
9092
)
9193

92-
new_declarations, new_definitions = self._generate_enumeration_codec_and_to_string_functions(
94+
(
95+
new_declarations,
96+
new_definitions,
97+
) = self._generate_enumeration_codec_and_to_string_functions(
9398
all_msg_types_enumeration_type, msg_type_enumeration_types
9499
)
95100
declarations += new_declarations
96101
definitions += new_definitions
97102

98103
# Arrays
99-
new_declarations, new_definitions = (
100-
self._generate_array_codec_and_to_string_functions()
101-
)
104+
(
105+
new_declarations,
106+
new_definitions,
107+
) = self._generate_array_codec_and_to_string_functions()
102108
declarations += new_declarations
103109
definitions += new_definitions
104110

@@ -110,9 +116,10 @@ def _generate_record_codec_and_to_string_functions(self):
110116
declarations = ""
111117
definitions = ""
112118
for record in self.record_types:
113-
new_declarations, new_definitions = (
114-
record.generate_codecs_and_support_functions()
115-
)
119+
(
120+
new_declarations,
121+
new_definitions,
122+
) = record.generate_codecs_and_support_functions()
116123
declarations += new_declarations
117124
definitions += new_definitions
118125
return declarations, definitions
@@ -123,9 +130,10 @@ def _generate_array_codec_and_to_string_functions(self):
123130
declarations = ""
124131
definitions = ""
125132
for array in self.array_types:
126-
new_declarations, new_definitions = (
127-
array.generate_codecs_and_support_functions()
128-
)
133+
(
134+
new_declarations,
135+
new_definitions,
136+
) = array.generate_codecs_and_support_functions()
129137
declarations += new_declarations
130138
definitions += new_definitions
131139

@@ -182,9 +190,10 @@ def _generate_enumeration_codec_and_to_string_functions(
182190
else:
183191
offset = 0
184192

185-
new_declarations, new_definitions = enum.generate_codecs_and_support_functions(
186-
offset
187-
)
193+
(
194+
new_declarations,
195+
new_definitions,
196+
) = enum.generate_codecs_and_support_functions(offset)
188197
declarations += new_declarations
189198
definitions += new_definitions
190199

vunit/test/lint/test_license.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class TestLicense(unittest.TestCase):
4444
"""
4545

4646
def test_that_a_valid_license_exists_in_source_files_and_that_global_licensing_information_is_correct(
47-
self
47+
self,
4848
):
4949
for file_name in find_licensed_files():
5050
code = ostools.read_file(file_name)

vunit/test/unit/test_check_preprocessor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def _verify_result(self, code, expected_result):
2929
self.assertEqual(result, expected_result)
3030

3131
def test_that_only_relation_checks_are_preprocessed_so_that_parsing_is_simplified(
32-
self
32+
self,
3333
):
3434
code = """
3535
check_relation(a /= b);
@@ -57,7 +57,7 @@ def test_that_generated_message_is_combined_with_a_custom_message(self):
5757
self._verify_result(code, expected_result)
5858

5959
def test_that_the_top_level_relation_is_correctly_identified_as_the_main_relation(
60-
self
60+
self,
6161
):
6262
code = """
6363
check_relation(foo(a > b) = c);
@@ -79,7 +79,7 @@ def test_that_the_top_level_relation_is_correctly_identified_as_the_main_relatio
7979
self._verify_result(code, expected_result)
8080

8181
def test_that_parsing_is_not_fooled_by_strings_containing_characters_relevant_to_parsing(
82-
self
82+
self,
8383
):
8484
code = """
8585
check_relation(41 = ascii(')'), "Incorrect ascii for ')'");

vunit/test/unit/test_dependency_graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def test_should_resort_after_additions(self):
7777
self._check_result(result, dependencies)
7878

7979
def test_get_direct_dependencies_should_return_empty_set_when_no_dependendencies(
80-
self
80+
self,
8181
):
8282
nodes = ["a", "b", "c"]
8383
dependencies = []

vunit/test/unit/test_location_preprocessor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def test_that_already_located_calls_are_left_untouched(self):
168168
self._verify_result(code, expected_result)
169169

170170
def test_that_asserts_with_severity_level_are_not_affected_despite_name_conflict_with_log_functions(
171-
self
171+
self,
172172
):
173173
code = """
174174
assert False report "Failed" severity warning;
@@ -179,7 +179,7 @@ def test_that_asserts_with_severity_level_are_not_affected_despite_name_conflict
179179
self._verify_result(code, expected_result=code)
180180

181181
def test_that_assignments_to_signals_and_variables_with_listed_subprogram_names_are_ignored(
182-
self
182+
self,
183183
):
184184
code = """
185185
sub_prog := true;

vunit/test/unit/test_test_bench.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def test_find_explicit_tests_verilog(self):
589589

590590
def test_find_implicit_test_vhdl(self):
591591
with mock.patch("vunit.test_bench.LOGGER") as logger:
592-
test, = _find_tests(
592+
(test,) = _find_tests(
593593
"""\
594594
595595
test_runner_setup(
@@ -602,7 +602,7 @@ def test_find_implicit_test_vhdl(self):
602602
assert not logger.warning.called
603603

604604
with mock.patch("vunit.test_bench.LOGGER") as logger:
605-
test, = _find_tests(
605+
(test,) = _find_tests(
606606
"""\
607607
608608
test_runner_setup
@@ -615,7 +615,7 @@ def test_find_implicit_test_vhdl(self):
615615
assert logger.warning.called
616616

617617
with mock.patch("vunit.test_bench.LOGGER") as logger:
618-
test, = _find_tests(
618+
(test,) = _find_tests(
619619
"""\
620620
621621
""",
@@ -628,7 +628,7 @@ def test_find_implicit_test_vhdl(self):
628628

629629
def test_find_implicit_test_verilog(self):
630630
with mock.patch("vunit.test_bench.LOGGER") as logger:
631-
test, = _find_tests(
631+
(test,) = _find_tests(
632632
"""\
633633
634634
`TEST_SUITE""",
@@ -640,7 +640,7 @@ def test_find_implicit_test_verilog(self):
640640
assert not logger.warning.called
641641

642642
with mock.patch("vunit.test_bench.LOGGER") as logger:
643-
test, = _find_tests(
643+
(test,) = _find_tests(
644644
"""\
645645
TEST_SUITE
646646
""",
@@ -652,7 +652,7 @@ def test_find_implicit_test_verilog(self):
652652
assert logger.warning.called
653653

654654
with mock.patch("vunit.test_bench.LOGGER") as logger:
655-
test, = _find_tests(
655+
(test,) = _find_tests(
656656
"""\
657657
""",
658658
file_name="file_name.sv",

vunit/test/unit/test_ui.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def tearDown(self):
4848
rmtree(self.tmp_path)
4949

5050
def test_global_custom_preprocessors_should_be_applied_in_the_order_they_are_added(
51-
self
51+
self,
5252
):
5353
ui = self._create_ui()
5454
ui.add_library("lib")
@@ -81,7 +81,7 @@ def test_global_custom_preprocessors_should_be_applied_in_the_order_they_are_add
8181
)
8282

8383
def test_global_check_and_location_preprocessors_should_be_applied_after_global_custom_preprocessors(
84-
self
84+
self,
8585
):
8686
ui = self._create_ui()
8787
ui.add_library("lib")
@@ -119,7 +119,7 @@ def test_global_check_and_location_preprocessors_should_be_applied_after_global_
119119
)
120120

121121
def test_locally_specified_preprocessors_should_be_used_instead_of_any_globally_defined_preprocessors(
122-
self
122+
self,
123123
):
124124
ui = self._create_ui()
125125
ui.add_library("lib")

0 commit comments

Comments
 (0)