mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
fix(tt_tool): fails on non-analog projects
This commit is contained in:
+4
-2
@@ -275,8 +275,10 @@ class Project:
|
||||
return commit_info["workflow_url"]
|
||||
|
||||
def is_analog_design(self) -> bool:
|
||||
commit_info = self.read_commit_info_json()
|
||||
return commit_info.get("analog", False)
|
||||
if self.is_user_project:
|
||||
return len(self.info.pinout.ua) > 0
|
||||
else:
|
||||
return self.read_commit_info_json().get("analog", False)
|
||||
|
||||
def get_workflow_url(self):
|
||||
GITHUB_SERVER_URL = os.getenv("GITHUB_SERVER_URL")
|
||||
|
||||
@@ -14,6 +14,12 @@ class PinoutSection:
|
||||
self.ui = self._pins(yaml_data, "ui", 8)
|
||||
self.uo = self._pins(yaml_data, "uo", 8)
|
||||
self.uio = self._pins(yaml_data, "uio", 8)
|
||||
self.ua: List[str] = []
|
||||
for i in range(8):
|
||||
pin = yaml_data.get(f"ua[{i}]")
|
||||
if pin is None:
|
||||
break
|
||||
self.ua.append(pin)
|
||||
|
||||
def _pins(self, yaml_data: Dict[str, Any], name: str, count: int) -> List[str]:
|
||||
result: List[str] = []
|
||||
|
||||
Reference in New Issue
Block a user