Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dev_scripts/codegen/download_aas_core_meta_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import argparse
import sys
from typing import Dict, Union

import requests

Expand All @@ -24,7 +25,7 @@ def _latest_commit_sha_for_path(
Uses: GET /repos/{owner}/{repo}/commits?path=...&sha=...&per_page=1
"""
url = f"{GITHUB_API}/repos/{owner}/{repo}/commits"
params = {"path": path, "sha": ref, "per_page": 1}
params: Dict[str, Union[str, int]] = {"path": path, "sha": ref, "per_page": 1}
resp = requests.get(url, params=params, timeout=timeout)
try:
resp.raise_for_status()
Expand All @@ -43,6 +44,7 @@ def _latest_commit_sha_for_path(
sha = commits[0].get("sha")
if not sha or not isinstance(sha, str):
raise RuntimeError("API did not return a valid commit SHA.")
assert isinstance(sha, str)
return sha


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ def main() -> int:
if Step.REFORMAT in selects and Step.REFORMAT not in skips:
print("Re-formatting...")
reformat_targets = [
"codegen/codegen.py",
"codegen/download_aas_core_meta_model.py",
"continuous_integration_of_dev_scripts",
"update_to_aas_core_meta_codegen.py",
]
Expand All @@ -129,6 +131,8 @@ def main() -> int:
if Step.MYPY in selects and Step.MYPY not in skips:
print("Mypy'ing...")
mypy_targets = [
"codegen/codegen.py",
"codegen/download_aas_core_meta_model.py",
"continuous_integration_of_dev_scripts",
"update_to_aas_core_meta_codegen.py",
]
Expand All @@ -147,6 +151,8 @@ def main() -> int:
if Step.PYLINT in selects and Step.PYLINT not in skips:
print("Pylint'ing...")
pylint_targets = [
"codegen/codegen.py",
"codegen/download_aas_core_meta_model.py",
"continuous_integration_of_dev_scripts",
"update_to_aas_core_meta_codegen.py",
]
Expand Down
1 change: 1 addition & 0 deletions dev_scripts/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ dev = [
"black==25.9.0",
"mypy==1.18.2",
"pylint==3.3.8",
"types-requests>=2.32.4",
]

[tool.setuptools.packages.find]
Expand Down