forked from phoenix-oss/llama-stack-mirror
chore: enable ruff for ./scripts too (#1643)
# What does this PR do? Enable ruff for scripts. [//]: # (If resolving an issue, uncomment and update the line below) [//]: # (Closes #[issue-number]) ## Test Plan [Describe the tests you ran to verify your changes with result summaries. *Provide clear instructions so the plan can be easily re-executed.*] [//]: # (## Documentation) Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
parent
706b4ca651
commit
814eb75321
2 changed files with 3 additions and 6 deletions
|
@ -114,7 +114,6 @@ exclude = [
|
||||||
"./.git",
|
"./.git",
|
||||||
"./docs/*",
|
"./docs/*",
|
||||||
"./build",
|
"./build",
|
||||||
"./scripts",
|
|
||||||
"./venv",
|
"./venv",
|
||||||
"*.pyi",
|
"*.pyi",
|
||||||
".pre-commit-config.yaml",
|
".pre-commit-config.yaml",
|
||||||
|
|
|
@ -11,7 +11,7 @@ import requests
|
||||||
|
|
||||||
|
|
||||||
def get_all_releases(token):
|
def get_all_releases(token):
|
||||||
url = f"https://api.github.com/repos/meta-llama/llama-stack/releases"
|
url = "https://api.github.com/repos/meta-llama/llama-stack/releases"
|
||||||
headers = {"Accept": "application/vnd.github.v3+json"}
|
headers = {"Accept": "application/vnd.github.v3+json"}
|
||||||
|
|
||||||
if token:
|
if token:
|
||||||
|
@ -22,9 +22,7 @@ def get_all_releases(token):
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
return response.json()
|
return response.json()
|
||||||
else:
|
else:
|
||||||
raise Exception(
|
raise Exception(f"Error fetching releases: {response.status_code}, {response.text}")
|
||||||
f"Error fetching releases: {response.status_code}, {response.text}"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def clean_release_body(body):
|
def clean_release_body(body):
|
||||||
|
@ -55,7 +53,7 @@ def merge_release_notes(output_file, token=None):
|
||||||
releases = get_all_releases(token)
|
releases = get_all_releases(token)
|
||||||
|
|
||||||
with open(output_file, "w", encoding="utf-8") as md_file:
|
with open(output_file, "w", encoding="utf-8") as md_file:
|
||||||
md_file.write(f"# Changelog\n\n")
|
md_file.write("# Changelog\n\n")
|
||||||
|
|
||||||
for release in releases:
|
for release in releases:
|
||||||
md_file.write(f"# {release['tag_name']}\n")
|
md_file.write(f"# {release['tag_name']}\n")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue