Skip to content

Commit a86d148

Browse files
quartoxilevkivskyi
authored andcommitted
Split on ' # ' for check tests (#3417)
1 parent 2346b74 commit a86d148

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mypy/test/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def expand_errors(input: List[str], output: List[str], fnam: str) -> None:
399399

400400
for i in range(len(input)):
401401
# The first in the split things isn't a comment
402-
for possible_err_comment in input[i].split('#')[1:]:
402+
for possible_err_comment in input[i].split(' # ')[1:]:
403403
m = re.search(
404404
'^([ENW]):((?P<col>\d+):)? (?P<message>.*)$',
405405
possible_err_comment.strip())

test-data/unit/check-abstract.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class A(metaclass=ABCMeta):
154154
@abstractmethod
155155
def g(self): pass
156156
class B(A): pass
157-
B()# E: Cannot instantiate abstract class 'B' with abstract attributes 'f' and 'g'
157+
B() # E: Cannot instantiate abstract class 'B' with abstract attributes 'f' and 'g'
158158
[out]
159159

160160
[case testInstantiationAbstractsInTypeForFunctions]

0 commit comments

Comments
 (0)