-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scripts/run_all.py
#2046
Add scripts/run_all.py
#2046
Conversation
17539d0
to
e06cce4
Compare
scripts/run_all.py
Outdated
from glob import glob | ||
|
||
|
||
def run_py_example(path: str, args: list[str] = []) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails on my Python 3.8.12 with:
❯ scripts/run_all.py
Traceback (most recent call last):
File "scripts/run_all.py", line 12, in <module>
def run_py_example(path: str, args: list[str] = []) -> None:
TypeError: 'type' object is not subscriptable
I assume you are using a newer Python?
Of course, this being python, the linter doesn't catch this 🤦 (Python 3.8 is our minimum supported version, and what is used on CI)
What we do elsewhere is from typing import List
and then args: List[str]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm currently on 3.10
. I guess I'll also downgrade to 3.8
to catch this stuff earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ python --version
Python 3.8.16
e3ca9e7
to
2894bdb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done!
First part of #1945
This PR adds
scripts/run_all.py
which is a port of thepy-run-all
recipe in thejustfile
.Checklist
PR Build Summary: https://build.rerun.io/pr/2046