Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
pekkaklarck committed Aug 26, 2022
1 parent 0bf4482 commit 2ca8371
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/robot/parsing/lexer/blocklexers.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def lexer_for(self, statement):
if cls.handles(statement, self.ctx):
lexer = cls(self.ctx)
return lexer
raise TypeError("%s did not find lexer for statement %s."
% (type(self).__name__, statement))
raise TypeError(f"{type(self).__name__} does not have lexer for "
f"statement {statement}.")

def lexer_classes(self):
return ()
Expand Down
4 changes: 2 additions & 2 deletions src/robot/parsing/parser/fileparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
class FileParser(Parser):

def __init__(self, source=None):
Parser.__init__(self, File(source=self._get_path(source)))
super().__init__(File(source=self._get_path(source)))

def _get_path(self, source):
if not source:
Expand Down Expand Up @@ -62,7 +62,7 @@ class SectionParser(Parser):
model_class = None

def __init__(self, header):
Parser.__init__(self, self.model_class(header))
super().__init__(self.model_class(header))

def handles(self, statement):
return statement.type not in Token.HEADER_TOKENS
Expand Down

0 comments on commit 2ca8371

Please sign in to comment.