Skip to content

Conversation

@neuronflow
Copy link
Collaborator

Signed-off-by: neuronflow florian.kofler@tum.de

Signed-off-by: neuronflow <florian.kofler@tum.de>
Signed-off-by: neuronflow <florian.kofler@tum.de>
Copilot AI review requested due to automatic review settings January 28, 2026 16:54
@neuronflow neuronflow linked an issue Jan 28, 2026 that may be closed by this pull request
@neuronflow neuronflow changed the title mewp fixing indents in defacer base class Jan 28, 2026
@brainless-bot
Copy link
Contributor

brainless-bot bot commented Jan 28, 2026

🤖 Code Formatting Reminder

Hello there! 👋 It looks like the code in this pull request might benefit from some formatting improvements.
Fix the issues locally or use our auto format action by commenting /format on this PR!

Code style: black

@neuronflow
Copy link
Collaborator Author

/format

@brainless-bot
Copy link
Contributor

brainless-bot bot commented Jan 28, 2026

🤖 I will now format your code with black. Check the status here.

Copy link
Contributor

Copilot AI 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 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 deface method, which was incorrectly nested inside __init__
  • Added Path type conversions for input_image_path and mask_path parameters to prevent AttributeError when calling .is_file()
  • Updated docstring to clarify that mask_image_path is 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)
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
mask_path = Path(mask_path)
mask_path = Path(mask_path)
defaced_image_path = Path(defaced_image_path)

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

consistency with what?

Copy link
Contributor

Copilot AI 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

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.

Copy link
Collaborator

@nicmuenster nicmuenster left a comment

Choose a reason for hiding this comment

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

Looks good to me

@nicmuenster nicmuenster merged commit 54916e5 into main Jan 29, 2026
14 of 15 checks passed
@nicmuenster nicmuenster deleted the 172-bug-defacer-base-class-not-properly-indented branch January 29, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] defacer base class not properly indented.

3 participants