mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Remove argv usage from Python scripts (#7311)
argparse will automatically read sys.argv, so we don't need to pass it in manually. Furthermore, none of our scripts customize argv.
This commit is contained in:
6
.github/workflows/pregen_all.py
vendored
6
.github/workflows/pregen_all.py
vendored
@@ -6,7 +6,7 @@ import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def main(argv):
|
||||
def main():
|
||||
script_path = Path(__file__).resolve()
|
||||
REPO_ROOT = script_path.parent.parent.parent
|
||||
parser = argparse.ArgumentParser()
|
||||
@@ -15,7 +15,7 @@ def main(argv):
|
||||
help="Path to the quickbuf protoc plugin",
|
||||
required=True,
|
||||
)
|
||||
args = parser.parse_args(argv)
|
||||
args = parser.parse_args()
|
||||
subprocess.run(
|
||||
[sys.executable, f"{REPO_ROOT}/hal/generate_usage_reporting.py"], check=True
|
||||
)
|
||||
@@ -61,4 +61,4 @@ def main(argv):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv[1:])
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user