Skip to content

Commit 7653a46

Browse files
committed
fix: cleanup commented methods
1 parent 412e8bf commit 7653a46

File tree

2 files changed

+2
-54
lines changed

2 files changed

+2
-54
lines changed

src/pyosmeta/github_api.py

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -185,53 +185,6 @@ def _get_response_rest(self, url: str) -> list[dict[str, Any]]:
185185

186186
return results
187187

188-
# def return_response(self) -> list[dict[str, object]]:
189-
# """TODO: delete this one all works
190-
# Make a GET request to the Github API endpoint
191-
# Deserialize json response to list of dicts.
192-
193-
# Handles pagination as github has a REST api 100 request max.
194-
195-
# Returns
196-
# -------
197-
# list
198-
# List of dict items each containing a review issue
199-
# """
200-
201-
# results = []
202-
# # This is computed as a property. Reassign here to support pagination
203-
# # and new urls for each page
204-
# api_endpoint_url = self.api_endpoint
205-
# try:
206-
# while True:
207-
# response = requests.get(
208-
# api_endpoint_url,
209-
# headers={"Authorization": f"token {self.get_token()}"},
210-
# )
211-
# response.raise_for_status()
212-
# results.extend(response.json())
213-
214-
# # Check if there are more pages to fetch
215-
# if "next" in response.links:
216-
# next_url = response.links["next"]["url"]
217-
# api_endpoint_url = next_url
218-
# else:
219-
# break
220-
221-
# # Handle rate limiting
222-
# self.handle_rate_limit(response)
223-
224-
# except requests.HTTPError as exception:
225-
# if exception.response.status_code == 401:
226-
# print(
227-
# "Oops - your request isn't authorized. Your token may be "
228-
# "expired or invalid. Please refresh your token."
229-
# )
230-
# else:
231-
# raise exception
232-
233-
# return results
234-
235188
def get_gh_metrics(
236189
self,
237190
endpoints: dict[dict[str, str]],

src/pyosmeta/parse_issues.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ def get_issues(self) -> list[Issue]:
6161
grabbing issues with ALL using an and operator labels in a list. We
6262
need to use an OR as a selector.
6363
"""
64-
# TODO:
64+
6565
url = self.github_api.api_endpoint
6666
issues = self.github_api._get_response_rest(url)
67-
# issues = self.github_api.return_response()
67+
6868
# Filter issues according to label query value
6969
labels = self.github_api.labels
7070
filtered_issues = [
@@ -321,9 +321,6 @@ def parse_issues(
321321
errors = {}
322322
for issue in issues:
323323
print(f"Processing review {issue.title}")
324-
# if "Stingray" in issue.title:
325-
# print("Stop now!")
326-
# break
327324

328325
try:
329326
review = self.parse_issue(issue)
@@ -396,8 +393,6 @@ def get_repo_paths(
396393
all_repos[a_package] = {"owner": owner, "repo_name": repo}
397394
return all_repos
398395

399-
# This works - i could just make it more generic and remove fmt since it's
400-
# not used and replace it with a number of values and a test string
401396
def get_categories(
402397
self,
403398
issue_list: list[str],

0 commit comments

Comments
 (0)