Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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