Skip to content

Commit

Permalink
Add backwards compatible types to file generated by __test__.py (#441)
Browse files Browse the repository at this point in the history
As suggested in
#435 (comment)
a backwards compatible (< Python 3.9) type hint.

Regardless of merging this PR or not, the current 1.0.0 release is
broken for < Python 3.9. Since Python 3.8 is already EOL, this is in
theory valid, but I guess there are still a few people using Python 3.8
because of Ubuntu 20.04.

---

### Changes are visible to end-users: no

### Test plan

<!-- Delete any which do not apply -->

- Covered by existing test cases
- New test cases added
- Manual testing; please provide instructions so we can reproduce:
  • Loading branch information
hofbi authored Nov 19, 2024
1 parent 9a9e4a2 commit eb9e0f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion py/private/pytest.py.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import sys
import os
from typing import List

import pytest

Expand All @@ -39,7 +40,7 @@ if __name__ == "__main__":
if test_filter is not None:
args.append(f"-k={test_filter}")

user_args = [$$FLAGS$$]
user_args: List[str] = [$$FLAGS$$]
if len(user_args) > 0:
args.extend(user_args)

Expand Down

0 comments on commit eb9e0f2

Please sign in to comment.