Skip to content

Commit 2e041c2

Browse files
committed
minor style changes
1 parent c8a7c3b commit 2e041c2

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

pyformlang/cfg/tests/test_cfg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,8 @@ def test_is_normal_form(self):
815815
assert cfg.is_normal_form()
816816

817817
def test_to_text(self):
818-
text = """E -> T E’
818+
text = """
819+
E -> T E’
819820
E’ -> T E’
820821
T -> F T’
821822
T’ -> *

pyformlang/cfg/tests/test_recursive_decent_parser.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ def test_creation(self):
2626

2727
def test_get_parsing_tree(self):
2828
assert self.parser.is_parsable(
29-
["(", "int", "+", "(", "int", "*", "int", ")", ")"] \
30-
)
29+
["(", "int", "+", "(", "int", "*", "int", ")", ")"])
3130
parse_tree = self.parser.get_parse_tree(
3231
["(", "int", "+", "(", "int", "*", "int", ")", ")"])
3332
derivation = parse_tree.get_leftmost_derivation()

pyformlang/indexed_grammar/tests/test_indexed_grammar.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ def test_simple_ig_regular_expression(self):
189189
assert not i_grammar.is_empty()
190190

191191
def test_simple_ig6(self):
192-
""" Test number 6 """
193192
l_rules = []
194193
l_rules.append(DuplicationRule("S", "S", "B"))
195194
rules = Rules(l_rules)
@@ -211,7 +210,6 @@ def test_simple_ig6(self):
211210
assert not i_grammar.is_empty()
212211

213212
def test_simple_ig7(self):
214-
""" Test 7 """
215213
l_rules = []
216214
l_rules.append(ProductionRule("S", "A", "end"))
217215
l_rules.append(ConsumptionRule("end", "A", "S"))
@@ -223,7 +221,6 @@ def test_simple_ig7(self):
223221
assert not i_grammar.is_empty()
224222

225223
def test_simple_ig8(self):
226-
""" Tests 8 """
227224
l_rules = []
228225
l_rules.append(ProductionRule("S", "Q", "end"))
229226
l_rules.append(ProductionRule("Q", "A", "end"))
@@ -239,7 +236,7 @@ def test_simple_ig8(self):
239236
assert not i_grammar.is_empty()
240237

241238
def test_simple_ig9(self):
242-
""" Tests 9 {a^n b^n c^n}"""
239+
""" {a^n b^n c^n}"""
243240
l_rules = []
244241
l_rules.append(ProductionRule("S", "T", "g"))
245242
l_rules.append(ProductionRule("T", "T", "f"))

pyformlang/indexed_grammar/tests/test_rules.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ def test_duplication_rules(self):
2626
""" Tests the duplication rules """
2727
dupli = DuplicationRule("B0", "A0", "C")
2828
assert dupli.terminals == set()
29-
assert str(dupli) == \
30-
"B0 -> A0 C"
29+
assert str(dupli) == "B0 -> A0 C"
3130

3231
def test_end_rule(self):
3332
""" Tests the end rules """

0 commit comments

Comments
 (0)