Skip to content

Fix checksum check to distinguish 0 and None. - #11

Merged
booqoffsky merged 1 commit into
booqoffsky:mainfrom
knutroy:fix-checksum-check
May 5, 2026
Merged

booqoffsky merged 1 commit into
booqoffsky:mainfrom
knutroy:fix-checksum-check

Conversation

@knutroy

@knutroy knutroy commented May 5, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@booqoffsky

Copy link
Copy Markdown
Owner

Thank you for your contribution! Could you fix the flake8 error? Just # noqa: WPS504 is ok.

@knutroy

knutroy commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for your contribution! Could you fix the flake8 error? Just # noqa: WPS504 is ok.

I flipped the logic around to please flake8.

@booqoffsky
booqoffsky merged commit 22ea0cf into booqoffsky:main May 5, 2026
8 checks passed
@knutroy

knutroy commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

An alternative approach would be to set checksum to 0 initially and get rid of the ternary inside the loop. However, it would change behavior if self.statements is empty (str(None) vs str(0)), so I did not go there.

@knutroy

knutroy commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

This PR was inspired by: https://gitlab.com/genomedx/labautomation/maestro/-/merge_requests/807#note_3311953924

(We have forked an asyncio implementation of neo4j-python-migrations.)

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.

2 participants