Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue comment edited #9

Merged
merged 4 commits into from
Dec 17, 2023
Merged

issue comment edited #9

merged 4 commits into from
Dec 17, 2023

Conversation

heitorpolidoro
Copy link
Owner

No description provided.

heitorpolidoro and others added 2 commits December 17, 2023 18:11
This commit fixes the style issues introduced in 0abace6 according to the output
from Black and isort.

Details: #9
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Type: Enhancement

PR Summary: The pull request introduces a new class IssueCommentEditedEvent to handle events when a comment in an issue is edited. This class extends the IssueCommentEvent and includes an initializer that takes a changes parameter along with any additional arguments to be passed to the superclass.

General suggestions:

  • Ensure that the changes parameter in the IssueCommentEditedEvent initializer is well-documented and validated to prevent potential bugs.
  • Consider adding type hints to the changes parameter to improve code readability and facilitate static type checking.
  • Explicitly define known parameters in the superclass __init__ method instead of using *args and **kwargs to enhance code clarity and maintainability.

Your trial expires on December 20, 2023. Please email [email protected] to continue using Sourcery ✨

@@ -40,3 +40,14 @@ class IssueCommentDeletedEvent(IssueCommentEvent):
"""This class represents an event when a comment in an Issue is deleted."""

action = "deleted"

class IssueCommentEditedEvent(IssueCommentEvent):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (llm): The new class IssueCommentEditedEvent is a good addition for handling edited comments. However, it would be beneficial to include a docstring that explains the parameters of the __init__ method, especially changes, for better code clarity.


class IssueCommentEditedEvent(IssueCommentEvent):
"""This class represents an event when a comment in an Issue is edited."""
def __init__(self, changes, *args, **kwargs):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (llm): It's important to validate the changes parameter to ensure it contains the expected structure and data types. Without validation, there's a risk of introducing bugs if the changes structure is not as anticipated.

Copy link

codacy-production bot commented Dec 17, 2023

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (c4aa65e) 102 102 100.00%
Head commit (b9b5b2c) 107 (+5) 107 (+5) 100.00% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#9) 5 5 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation

Copy link

codecov bot commented Dec 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c4aa65e) 100.00% compared to head (b9b5b2c) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master        #9   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          102       107    +5     
  Branches        13        13           
=========================================
+ Hits           102       107    +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

heitorpolidoro and others added 2 commits December 17, 2023 18:21
This commit fixes the style issues introduced in 133c53a according to the output
from Black and isort.

Details: #9
Copy link

sonarcloud bot commented Dec 17, 2023

Please retry analysis of this Pull-Request directly on SonarCloud

Copy link

sonarcloud bot commented Dec 17, 2023

@heitorpolidoro heitorpolidoro merged commit 7fd956b into master Dec 17, 2023
16 of 17 checks passed
@heitorpolidoro heitorpolidoro deleted the issuecommentedited branch December 17, 2023 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant