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

[IMP] manifest-behind-migrations: Improve detection of the check only using only odoo manifest file parsing #502

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

moylop260
Copy link
Collaborator

No description provided.

@moylop260 moylop260 self-assigned this Dec 18, 2024
@moylop260 moylop260 force-pushed the fix-manifest-behind-migrations-moy branch from 784f726 to fbd2c36 Compare December 18, 2024 22:43
@@ -106,6 +106,7 @@

import validators
from astroid import ClassDef, FunctionDef, NodeNG, nodes
from packaging.version import Version
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is even required? Apparently max works just fine (already being used for comparing migration versions) as it returns the lexicographically largest string, so it would be neat if we can just use inbuilt max.

Copy link
Collaborator Author

@moylop260 moylop260 Dec 18, 2024

Choose a reason for hiding this comment

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

If you create a folder migrations/no_version_format the max result will be different

>> max("0.1", "no_version_format")
Result: no_version_format

The packaging.version.Version raises:

  • packaging.version.InvalidVersion: Invalid version: 'no_version_format'

@moylop260 moylop260 force-pushed the fix-manifest-behind-migrations-moy branch 2 times, most recently from cd2563b to 3d5f978 Compare December 19, 2024 00:25
@moylop260 moylop260 force-pushed the fix-manifest-behind-migrations-moy branch from 3d5f978 to fb500d2 Compare December 19, 2024 00:40
@moylop260 moylop260 merged commit 072b0fa into OCA:main Dec 19, 2024
24 checks passed
@moylop260 moylop260 deleted the fix-manifest-behind-migrations-moy branch December 19, 2024 00:48
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