From a217705d1f16443b573a82b2a556e4079f27cde0 Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Thu, 1 Jun 2023 22:54:08 +0100 Subject: [PATCH] add a couple of type annotations in parser.py --- riscemu/parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/riscemu/parser.py b/riscemu/parser.py index 39c18a8..18cf438 100644 --- a/riscemu/parser.py +++ b/riscemu/parser.py @@ -121,7 +121,7 @@ class AssemblyFileLoader(ProgramLoader): with open(self.source_path, "r") as f: return parse_tokens(self.filename, tokenize(f)) - def parse_io(self, io): + def parse_io(self, io: Iterable[str]): return parse_tokens(self.filename, tokenize(io)) @classmethod @@ -139,5 +139,5 @@ class AssemblyFileLoader(ProgramLoader): return 0.01 @classmethod - def get_options(cls, argv: List[str]) -> [List[str], T_ParserOpts]: + def get_options(cls, argv: List[str]) -> tuple[List[str], T_ParserOpts]: return argv, {}