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:
Tyler Veness
2024-11-02 19:09:32 -07:00
committed by GitHub
parent 7c91b81906
commit a48f3c35f4
13 changed files with 50 additions and 56 deletions

View File

@@ -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()