Skip to content

Commit

Permalink
resolved all precommit issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak5598 committed Jun 16, 2024
1 parent b52b319 commit 2550ec6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/sammich/plugins/contributors.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@


def fetch_github_data(owner, repo):

headers = {"Authorization": f"token {GITHUB_TOKEN}"}
prs = requests.get(
f"{GITHUB_API_URL}/repos/{owner}/{repo}/pulls?state=closed", headers=headers
Expand Down
8 changes: 2 additions & 6 deletions src/sammich/plugins/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@


class ProjectPlugin(MachineBasePlugin):
def __init__(
self, client: SlackClient, settings: CaseInsensitiveDict, storage: PluginStorage
):
def __init__(self, client: SlackClient, settings: CaseInsensitiveDict, storage: PluginStorage):
super().__init__(client, settings, storage)
with open("data/projects.json") as f:
self.project_data = json.load(f)
Expand All @@ -24,9 +22,7 @@ async def project(self, command):

if project:
project_list = "\n".join(project)
message = (
f"Hello, here the information about '{project_name}':\n{project_list}"
)
message = f"Hello, here the information about '{project_name}':\n{project_list}"
else:
message = (
f"Hello, the project '{project_name}' is not recognized. "
Expand Down
8 changes: 4 additions & 4 deletions src/sammich/plugins/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@


class RepoPlugin(MachineBasePlugin):
def __init__(
self, client: SlackClient, settings: CaseInsensitiveDict, storage: PluginStorage
):
def __init__(self, client: SlackClient, settings: CaseInsensitiveDict, storage: PluginStorage):
super().__init__(client, settings, storage)
with open("data/repos.json") as f:
self.repo_data = json.load(f)
Expand Down Expand Up @@ -64,5 +62,7 @@ async def handle_button_click(self, action):
clicked_button_value = action.payload.actions[0].value
repos = self.repo_data.get(clicked_button_value)
repos_list = "\n".join(repos)
message = f"Hello, you can implement your '{clicked_button_value}' knowledge here:\n{repos_list}"
message = (
f"Hello, you can implement your '{clicked_button_value}' knowledge here:\n{repos_list}"
)
await action.say(message)

0 comments on commit 2550ec6

Please sign in to comment.