Spaces:
Running
Running
Commit ·
53d0a89
1
Parent(s): a6dcda8
ruff
Browse files
agent/tools/github_find_examples.py
CHANGED
|
@@ -180,7 +180,7 @@ def _fetch_repo_metadata(repos: List[str], token: str) -> Dict[str, Dict[str, An
|
|
| 180 |
"updated_at": data.get("updated_at", ""),
|
| 181 |
"description": data.get("description", ""),
|
| 182 |
}
|
| 183 |
-
except:
|
| 184 |
continue
|
| 185 |
|
| 186 |
return metadata
|
|
@@ -244,7 +244,7 @@ def _score_and_rank(
|
|
| 244 |
):
|
| 245 |
score += 20
|
| 246 |
reasons.append("recently updated")
|
| 247 |
-
except:
|
| 248 |
pass
|
| 249 |
|
| 250 |
# Filename quality
|
|
|
|
| 180 |
"updated_at": data.get("updated_at", ""),
|
| 181 |
"description": data.get("description", ""),
|
| 182 |
}
|
| 183 |
+
except Exception:
|
| 184 |
continue
|
| 185 |
|
| 186 |
return metadata
|
|
|
|
| 244 |
):
|
| 245 |
score += 20
|
| 246 |
reasons.append("recently updated")
|
| 247 |
+
except Exception:
|
| 248 |
pass
|
| 249 |
|
| 250 |
# Filename quality
|
agent/tools/github_read_file.py
CHANGED
|
@@ -105,7 +105,7 @@ def _get_last_commit_info(
|
|
| 105 |
commit_date = commit.get("commit", {}).get("committer", {}).get("date")
|
| 106 |
return commit_date, commit_sha
|
| 107 |
|
| 108 |
-
except:
|
| 109 |
pass
|
| 110 |
|
| 111 |
return None, None
|
|
@@ -147,7 +147,7 @@ def _fetch_file_contents(
|
|
| 147 |
error_data = response.json()
|
| 148 |
if "message" in error_data:
|
| 149 |
error_msg += f": {error_data['message']}"
|
| 150 |
-
except:
|
| 151 |
pass
|
| 152 |
raise GitHubAPIError(error_msg)
|
| 153 |
|
|
|
|
| 105 |
commit_date = commit.get("commit", {}).get("committer", {}).get("date")
|
| 106 |
return commit_date, commit_sha
|
| 107 |
|
| 108 |
+
except Exception:
|
| 109 |
pass
|
| 110 |
|
| 111 |
return None, None
|
|
|
|
| 147 |
error_data = response.json()
|
| 148 |
if "message" in error_data:
|
| 149 |
error_msg += f": {error_data['message']}"
|
| 150 |
+
except Exception:
|
| 151 |
pass
|
| 152 |
raise GitHubAPIError(error_msg)
|
| 153 |
|