Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FIX: Adding row string#136

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jahnvi480 merged 3 commits intomainfromjahnvi/row_changes
Jul 16, 2025
Merged

FIX: Adding row string#136

jahnvi480 merged 3 commits intomainfromjahnvi/row_changes
Jul 16, 2025

Conversation

jahnvi480
Copy link
Contributor

@jahnvi480jahnvi480 commentedJul 14, 2025
edited
Loading

ADO Work Item Reference

AB#37929


Summary

This pull request modifies theRow class inmssql_python/row.py to improve its string representation methods. The changes include adding a__str__ method for user-friendly output and updating the__repr__ method to focus on debugging.

Enhancements to string representation:

  • Added a__str__ method to provide a user-friendly string representation of theRow object by returning the tuple of its values as a string.
  • Updated the__repr__ method to provide a more detailed representation for debugging purposes by using therepr function on the tuple of values instead of a formatted string.

@CopilotCopilotAI review requested due to automatic review settingsJuly 14, 2025 08:24
@github-actionsgithub-actionsbot added the pr-size: smallMinimal code update labelJul 14, 2025
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances theRow class’s string output by introducing a user-facing__str__ method and refining the__repr__ for clearer debugging.

  • Added__str__ to return a stringified tuple of row values
  • Updated__repr__ to use the built-inrepr of the tuple for debugging
Comments suppressed due to low confidence (2)

mssql_python/row.py:69

  • [nitpick] The__repr__ output now omits the class name and only shows a bare tuple, which can be ambiguous during debugging. Consider including theRow class name in the output (e.g.,f"Row({repr(tuple(self._values))})") to make the object type explicit.
        return repr(tuple(self._values))

mssql_python/row.py:63

  • There are no existing tests covering the new__str__ method (and the updated__repr__). Adding unit tests to verify their outputs will help prevent regressions and ensure correct formatting.
    def __str__(self):

@github-actionsgithub-actionsbot added pr-size: smallMinimal code update and removed pr-size: smallMinimal code update labelsJul 14, 2025
Copy link
Collaborator

@bewithgauravbewithgaurav left a comment

Choose a reason for hiding this comment

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

lets add a testcase in test_cursor py file

@github-actionsgithub-actionsbot added pr-size: smallMinimal code update and removed pr-size: smallMinimal code update labelsJul 14, 2025
@github-actionsgithub-actionsbot added pr-size: smallMinimal code update and removed pr-size: smallMinimal code update labelsJul 16, 2025
@jahnvi480jahnvi480 merged commit6e11847 intomainJul 16, 2025
16 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@bewithgauravbewithgauravbewithgaurav approved these changes

@sumitmsftsumitmsftsumitmsft approved these changes

Assignees
No one assigned
Labels
pr-size: smallMinimal code update
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@jahnvi480@bewithgaurav@sumitmsft

[8]ページ先頭

©2009-2025 Movatter.jp