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

gh-104683: Argument clinic: modernise cpp.Monitor #106698

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Jul 12, 2023

  • Convert the class into a dataclass (this necessitates moving is_a_simple_defined into the global namespace)
  • use an f-string for the __repr__ method

@AlexWaygood
Copy link
Member Author

I think this is the last class that can be usefully converted to become a dataclass, FTR. For the remaining classes in argument clinic, ISTM converting the classes to become dataclasses would make the code more complicated, rather than improving readability. And that would defeat the object.

Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@erlend-aasland
Copy link
Contributor

erlend-aasland commented Jul 12, 2023

  • Convert the class into a dataclass (this necessitates moving is_a_simple_defined into the global namespace)

Makes more sense to have it there as a global, IMO

@AlexWaygood AlexWaygood enabled auto-merge (squash) July 12, 2023 22:35
@AlexWaygood AlexWaygood merged commit 8aa4bea into python:main Jul 12, 2023
@AlexWaygood AlexWaygood deleted the clinic-monitor-dc branch July 12, 2023 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants