diff --git a/pytest.ini b/pytest.ini index 6c737ec0..32022ae5 100644 --- a/pytest.ini +++ b/pytest.ini @@ -27,4 +27,4 @@ log_cli_level=INFO # # Add directory to find the example branding.py (needed by bootloader.py) in ./stubs: # (Requires pytest >= 7.0.0): -pythonpath=stubs \ No newline at end of file +pythonpath=stubs diff --git a/pytype_runner.py b/pytype_runner.py index 3ee62e98..9625736f 100755 --- a/pytype_runner.py +++ b/pytype_runner.py @@ -77,7 +77,7 @@ def run_pytype(command: List[str], branch_url: str, errorlog: TextIO, results): ok = True while ok: for key, _ in sel.select(): - line = key.fileobj.readline() # type: ignore + line = key.fileobj.readline() # type: ignore[union-attr] if not line: ok = False break diff --git a/tests/test_bootloader.py b/tests/test_bootloader.py index 4a34cec6..c67dbfa2 100644 --- a/tests/test_bootloader.py +++ b/tests/test_bootloader.py @@ -19,15 +19,16 @@ def _test_cfg(self, cfg): universal_newlines=True) assert proc.stdout is not None # for pyright, to ensure it is valid + # check the diff output, working around trailing whitespace issues self.assertEqual(proc.stdout.read(), '''5a6,13 > if [ -s $prefix/grubenv ]; then > load_env > fi -> +> ''' + ''' > if [ -n "$override_entry" ]; then > set default=$override_entry > fi -> +> ''' + ''' ''') proc.stdout.close() proc.wait()