Cleanup: use autopep8 on release/lts
This commit is contained in:
@@ -18,6 +18,7 @@ class Version:
|
|||||||
Version class that extracts the major, minor and build from
|
Version class that extracts the major, minor and build from
|
||||||
a version string
|
a version string
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, version: str):
|
def __init__(self, version: str):
|
||||||
self.version = version
|
self.version = version
|
||||||
v = version.split(".")
|
v = version.split(".")
|
||||||
@@ -28,6 +29,7 @@ class Version:
|
|||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return self.version
|
return self.version
|
||||||
|
|
||||||
|
|
||||||
def get_download_file_names(version: Version):
|
def get_download_file_names(version: Version):
|
||||||
yield f"blender-{version}-linux-x64.tar.xz"
|
yield f"blender-{version}-linux-x64.tar.xz"
|
||||||
yield f"blender-{version}-macos-x64.dmg"
|
yield f"blender-{version}-macos-x64.dmg"
|
||||||
|
@@ -30,8 +30,9 @@ class ReleaseLogLine:
|
|||||||
backend.
|
backend.
|
||||||
* url: (str) url of the ticket task or commit.
|
* url: (str) url of the ticket task or commit.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, line: str):
|
def __init__(self, line: str):
|
||||||
self.line=line
|
self.line = line
|
||||||
items = line.split("|")
|
items = line.split("|")
|
||||||
self.task_id = None
|
self.task_id = None
|
||||||
self.commit_id = None
|
self.commit_id = None
|
||||||
@@ -54,10 +55,10 @@ class ReleaseLogLine:
|
|||||||
self.title = ""
|
self.title = ""
|
||||||
self.url = f"https://developer.blender.org/{self.ref}"
|
self.url = f"https://developer.blender.org/{self.ref}"
|
||||||
|
|
||||||
def __format_as_html(self)-> str:
|
def __format_as_html(self) -> str:
|
||||||
return f" <li>{self.title} [<a href=\"{self.url}\">{self.ref}</a>]</li>"
|
return f" <li>{self.title} [<a href=\"{self.url}\">{self.ref}</a>]</li>"
|
||||||
|
|
||||||
def __format_as_text(self) ->str:
|
def __format_as_text(self) -> str:
|
||||||
return f"* {self.title} [{self.ref}]"
|
return f"* {self.title} [{self.ref}]"
|
||||||
|
|
||||||
def __format_as_steam(self) -> str:
|
def __format_as_steam(self) -> str:
|
||||||
@@ -110,7 +111,7 @@ def extract_release_notes(version: str, task_id: int):
|
|||||||
description = task["description"]
|
description = task["description"]
|
||||||
lines = description.split("\n")
|
lines = description.split("\n")
|
||||||
start_index = lines.index(f"## Blender {version} ##")
|
start_index = lines.index(f"## Blender {version} ##")
|
||||||
lines = lines[start_index+1:]
|
lines = lines[start_index + 1:]
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if not line.strip():
|
if not line.strip():
|
||||||
continue
|
continue
|
||||||
@@ -125,7 +126,7 @@ def extract_release_notes(version: str, task_id: int):
|
|||||||
log_line.title = format_title(issue_task.title)
|
log_line.title = format_title(issue_task.title)
|
||||||
yield log_line
|
yield log_line
|
||||||
elif log_line.commit_id:
|
elif log_line.commit_id:
|
||||||
commits = phab.diffusion.commit.search(constraints={"identifiers":[log_line.commit_id]})
|
commits = phab.diffusion.commit.search(constraints={"identifiers": [log_line.commit_id]})
|
||||||
commit = commits.data[0]
|
commit = commits.data[0]
|
||||||
commit_message = commit['fields']['message']
|
commit_message = commit['fields']['message']
|
||||||
commit_title = commit_message.split("\n")[0]
|
commit_title = commit_message.split("\n")[0]
|
||||||
|
Reference in New Issue
Block a user