Skip to content

Commit 3f41ed8

Browse files
committed
chore: fix spelling and formatting
Signed-off-by: Zack Koppert <zkoppert@github.com>
1 parent 1ceaf05 commit 3f41ed8

File tree

5 files changed

+17
-27
lines changed

5 files changed

+17
-27
lines changed

auth.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ def auth_to_github(
4141
elif token:
4242
github_connection = github3.login(token=token)
4343
else:
44-
raise ValueError(
45-
"GH_TOKEN or the set of [GH_APP_ID, GH_APP_INSTALLATION_ID, \
46-
GH_APP_PRIVATE_KEY] environment variables are not set"
47-
)
44+
raise ValueError("GH_TOKEN or the set of [GH_APP_ID, GH_APP_INSTALLATION_ID, \
45+
GH_APP_PRIVATE_KEY] environment variables are not set")
4846

4947
if not github_connection:
5048
raise ValueError("Unable to authenticate to GitHub")

markdown_writer.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,8 @@ def write_to_markdown(
159159
# If all the metrics are None, then there are no issues
160160
if not issues_with_metrics or len(issues_with_metrics) == 0:
161161
file.write("no issues found for the given search criteria\n\n")
162-
file.write(
163-
"\n_This report was generated with the \
164-
[Issue Metrics Action](https://github.com/github/issue-metrics)_\n"
165-
)
162+
file.write("\n_This report was generated with the \
163+
[Issue Metrics Action](https://github.com/github/issue-metrics)_\n")
166164
if search_query:
167165
file.write(f"Search query used to find these items: `{search_query}`\n")
168166
return
@@ -254,10 +252,8 @@ def write_to_markdown(
254252
file.write(f" {issue.pr_comment_count or 'N/A'} |")
255253
file.write("\n")
256254
file.write("\n")
257-
file.write(
258-
"_This report was generated with the \
259-
[Issue Metrics Action](https://github.com/github/issue-metrics)_\n"
260-
)
255+
file.write("_This report was generated with the \
256+
[Issue Metrics Action](https://github.com/github/issue-metrics)_\n")
261257
if search_query:
262258
file.write(f"Search query used to find these items: `{search_query}`\n")
263259

most_active_mentors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- should there be a limit to how many comments per PR we consider to avoid
1414
having the statistic dominated by contested PRs?
1515
- should this metric count consecutive comments coming from the same user as
16-
only one to avoid people unnessesarily splitting their comments to game the
16+
only one to avoid people unnecessarily splitting their comments to game the
1717
metric?
1818
- instead of PR comments should we count PRs on which a username was seen as
1919
commenter?

search.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,13 @@ def wait_for_api_refresh(
8181
wait_for_api_refresh(issues_iterator, rate_limit_bypass)
8282

8383
except github3.exceptions.ForbiddenError as e:
84-
print(
85-
f"You do not have permission to view a repository \
86-
from: '{repos_and_owners_string}'; Check your API Token."
87-
)
84+
print(f"You do not have permission to view a repository \
85+
from: '{repos_and_owners_string}'; Check your API Token.")
8886
print_error_messages(e)
8987
sys.exit(1)
9088
except github3.exceptions.NotFoundError as e:
91-
print(
92-
f"The repository could not be found; \
93-
Check the repository owner and names: '{repos_and_owners_string}"
94-
)
89+
print(f"The repository could not be found; \
90+
Check the repository owner and names: '{repos_and_owners_string}")
9591
print_error_messages(e)
9692
sys.exit(1)
9793
except github3.exceptions.ConnectionError as e:

test_issue_metrics.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ def test_get_per_issue_metrics_with_hide_envs(self):
112112
]
113113

114114
# Call the function and check the result
115-
with unittest.mock.patch( # type:ignore
115+
with unittest.mock.patch( # type: ignore
116116
"issue_metrics.measure_time_to_first_response",
117117
measure_time_to_first_response,
118-
), unittest.mock.patch( # type:ignore
118+
), unittest.mock.patch( # type: ignore
119119
"issue_metrics.measure_time_to_close", measure_time_to_close
120120
):
121121
(
@@ -221,10 +221,10 @@ def test_get_per_issue_metrics_without_hide_envs(self):
221221
]
222222

223223
# Call the function and check the result
224-
with unittest.mock.patch( # type:ignore
224+
with unittest.mock.patch( # type: ignore
225225
"issue_metrics.measure_time_to_first_response",
226226
measure_time_to_first_response,
227-
), unittest.mock.patch( # type:ignore
227+
), unittest.mock.patch( # type: ignore
228228
"issue_metrics.measure_time_to_close", measure_time_to_close
229229
):
230230
(
@@ -326,10 +326,10 @@ def test_get_per_issue_metrics_with_ignore_users(self):
326326
]
327327

328328
# Call the function and check the result
329-
with unittest.mock.patch( # type:ignore
329+
with unittest.mock.patch( # type: ignore
330330
"issue_metrics.measure_time_to_first_response",
331331
measure_time_to_first_response,
332-
), unittest.mock.patch( # type:ignore
332+
), unittest.mock.patch( # type: ignore
333333
"issue_metrics.measure_time_to_close", measure_time_to_close
334334
):
335335
(

0 commit comments

Comments
 (0)