fixing indents in defacer base class#173
Conversation
|
/format |
|
🤖 I will now format your code with black. Check the status here. |
There was a problem hiding this comment.
Pull request overview
This PR fixes critical bugs in the Defacer base class related to incorrect method indentation and missing type conversions that would have caused runtime failures.
Changes:
- Fixed the indentation of the abstract
defacemethod, which was incorrectly nested inside__init__ - Added Path type conversions for
input_image_pathandmask_pathparameters to prevent AttributeError when calling.is_file() - Updated docstring to clarify that
mask_image_pathis for saving output (consistent with subclass documentation)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| """ | ||
|
|
||
| input_image_path = Path(input_image_path) | ||
| mask_path = Path(mask_path) |
There was a problem hiding this comment.
For consistency with the handling of input_image_path and mask_path, consider also converting defaced_image_path to a Path object at the beginning of the method. While not strictly necessary (since it's only used with str() on line 93), this would ensure uniform type handling for all path parameters.
| mask_path = Path(mask_path) | |
| mask_path = Path(mask_path) | |
| defaced_image_path = Path(defaced_image_path) |
There was a problem hiding this comment.
consistency with what?
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: neuronflow florian.kofler@tum.de