-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update IssueCommentEvent.py * issue comment created test * style: format code with Black and isort This commit fixes the style issues introduced in bc2fc32 according to the output from Black and isort. Details: #6 * issue comment deleted test * style: format code with Black and isort This commit fixes the style issues introduced in 2929832 according to the output from Black and isort. Details: #6 * removing commented code * style: format code with Black and isort This commit fixes the style issues introduced in 81b1bda according to the output from Black and isort. Details: #6 * remove vcr * style: format code with Black and isort This commit fixes the style issues introduced in ec24cbc according to the output from Black and isort. Details: #6 * some fixes * style: format code with Black and isort This commit fixes the style issues introduced in 2db104e according to the output from Black and isort. Details: #6 * some fixes * style: format code with Black and isort This commit fixes the style issues introduced in c36ec12 according to the output from Black and isort. Details: #6 * refactor: autofix issues in 2 files Resolved issues in the following files with DeepSource Autofix: 1. github_app/Event.py 2. tests/test_lazy_completable_gituhb_objects.py * style: format code with Black and isort This commit fixes the style issues introduced in d3fc00b according to the output from Black and isort. Details: #6 * some fixes * fix test --------- Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
- Loading branch information
1 parent
80d4444
commit c4aa65e
Showing
24 changed files
with
305 additions
and
1,153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,42 @@ | ||
# from github.Issue import Issue | ||
# from github.IssueComment import IssueComment | ||
# from github.NamedUser import NamedUser | ||
# from github.Repository import Repository | ||
# | ||
# from github_app.Event import Event | ||
# from github_app.LazyCompletableGithubObject import LazyCompletableGithubObject | ||
# | ||
# | ||
# class IssueCommentEvent(Event): | ||
# name = "issue_comment" | ||
# | ||
# def __init__(self, comment, issue, repository, sender, **kwargs): | ||
# super().__init__(**kwargs) | ||
# self.issue: Issue = LazyCompletableGithubObject.get_lazy_instance( | ||
# Issue, attributes=issue | ||
# ) | ||
# self.issue_comment: IssueComment = ( | ||
# LazyCompletableGithubObject.get_lazy_instance( | ||
# IssueComment, attributes=comment | ||
# ) | ||
# ) | ||
# self.repository: Repository = LazyCompletableGithubObject.get_lazy_instance( | ||
# Repository, attributes=repository | ||
# ) | ||
# self.sender: NamedUser = LazyCompletableGithubObject.get_lazy_instance( | ||
# NamedUser, attributes=sender | ||
# ) | ||
# | ||
# | ||
# class IssueCommentCreatedEvent(IssueCommentEvent): | ||
# action = "created" | ||
# | ||
# | ||
# class IssueCommentDeletedEvent(IssueCommentEvent): | ||
# action = "deleted" | ||
from github.Issue import Issue | ||
from github.IssueComment import IssueComment | ||
from github.NamedUser import NamedUser | ||
from github.Repository import Repository | ||
|
||
from github_app.Event import Event | ||
from github_app.LazyCompletableGithubObject import LazyCompletableGithubObject | ||
|
||
|
||
class IssueCommentEvent(Event): | ||
"""This class represents a generic issue comment event.""" | ||
|
||
name = "issue_comment" | ||
|
||
def __init__(self, comment, issue, repository, sender, **kwargs): | ||
super().__init__(**kwargs) | ||
self.issue: Issue = LazyCompletableGithubObject.get_lazy_instance( | ||
Issue, attributes=issue | ||
) | ||
self.issue_comment: IssueComment = ( | ||
LazyCompletableGithubObject.get_lazy_instance( | ||
IssueComment, attributes=comment | ||
) | ||
) | ||
self.repository: Repository = LazyCompletableGithubObject.get_lazy_instance( | ||
Repository, attributes=repository | ||
) | ||
self.sender: NamedUser = LazyCompletableGithubObject.get_lazy_instance( | ||
NamedUser, attributes=sender | ||
) | ||
|
||
|
||
class IssueCommentCreatedEvent(IssueCommentEvent): | ||
"""This class represents an event when a comment in an Issue is created.""" | ||
|
||
action = "created" | ||
|
||
|
||
class IssueCommentDeletedEvent(IssueCommentEvent): | ||
"""This class represents an event when a comment in an Issue is deleted.""" | ||
|
||
action = "deleted" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
from github_app.ReleaseEvent import ReleaseReleasedEvent | ||
from github_app.IssueCommentEvent import ( | ||
IssueCommentCreatedEvent, | ||
IssueCommentDeletedEvent, | ||
IssueCommentEvent, | ||
) | ||
from github_app.ReleaseEvent import ReleaseEvent, ReleaseReleasedEvent | ||
|
||
__version__ = "0.0.1" | ||
|
||
__all__ = [ | ||
"IssueCommentEvent", | ||
"IssueCommentCreatedEvent", | ||
"IssueCommentDeletedEvent", | ||
"ReleaseEvent", | ||
"ReleaseReleasedEvent", | ||
"IssueCommentEvent", | ||
"IssueCommentCreatedEvent", | ||
"IssueCommentDeletedEvent", | ||
"ReleaseEvent", | ||
"ReleaseReleasedEvent", | ||
"IssueCommentEvent", | ||
"IssueCommentCreatedEvent", | ||
"IssueCommentDeletedEvent", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
-r requirements.txt | ||
pytest==7.4.3 | ||
pytest-cov==4.1.0 | ||
pytest-vcr==1.0.2 | ||
cryptography==41.0.7 |
Oops, something went wrong.