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

Remove unused Image.verbose attribute #4292

Merged
merged 1 commit into from Nov 10, 2023
Merged

Conversation

mguaypaq
Copy link
Member

A tiny tiny PR, but I noticed it once and it bothered me: the attribute Image.verbose is saved in __init__, but is never actually read anywhere. Instead, the pattern is that individual methods of Image which can be chatty accept a verbose parameter.

(To be sure that no one at all uses Image.verbose, I searched all python files for the string .verbose. All instances are either: self.verbose in another class, param.verbose in various scripts, SpinalCordStraightener.verbose, Transform.verbose, or ImageCropper.verbose.)

This attribute is never actually read anywhere. Instead, the pattern is that individual methods of `Image` which can be chatty accept a `verbose` parameter.
@mguaypaq mguaypaq added refactoring category: improves code structure without affecting user-facing functionality SCT API: image.py context: labels Nov 10, 2023
@mguaypaq mguaypaq added this to the 6.2 milestone Nov 10, 2023
Copy link
Member

@joshuacwnewton joshuacwnewton left a comment

Choose a reason for hiding this comment

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

I checked using PyCharm's "Find Usages" dialog, and it largely returned the same as your .verbose check. :)

@mguaypaq mguaypaq merged commit 729e2be into master Nov 10, 2023
24 checks passed
@mguaypaq mguaypaq deleted the mgp/remove-image-verbose branch November 10, 2023 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring category: improves code structure without affecting user-facing functionality SCT API: image.py context:
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants