Skip to content

fix: restore missing indentation in anonymise_pdf function body - #166

Merged
boscorat merged 1 commit into
masterfrom
fix/anonymise-indentation
Aug 6, 2026
Merged

fix: restore missing indentation in anonymise_pdf function body#166
boscorat merged 1 commit into
masterfrom
fix/anonymise-indentation

Conversation

@boscorat

@boscorat boscorat commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

The retain_descriptions parameter addition in d09e01c lost the 4-space indentation of the function body in anonymise.py, placing the if/return statements at module level. This causes a SyntaxError: 'return' outside function on any import of bank_statement_parser.

Root cause

Copilot Autofix mangled the indentation when adding the retain_descriptions parameter to the function body.

Fix

Restored proper 4-space indentation for lines 110-120 (the if guard and return statement).

Testing

  • ruff check and ruff format --check pass
  • The file is now valid Python and importable

The retain_descriptions parameter addition in d09e01c lost the 4-space
indentation of the function body, placing the if/return statements at
module level and causing a SyntaxError on import.
@boscorat
boscorat merged commit d64bca5 into master Aug 6, 2026
3 of 5 checks passed
@boscorat
boscorat deleted the fix/anonymise-indentation branch August 6, 2026 09:59
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.

1 participant