Skip to content

[ADD] no-translation-format: Do not use format with translations#192

Closed
SirPyTech wants to merge 1 commit into
OCA:mainfrom
PyTech-SRL:no-format-translation
Closed

[ADD] no-translation-format: Do not use format with translations#192
SirPyTech wants to merge 1 commit into
OCA:mainfrom
PyTech-SRL:no-format-translation

Conversation

@SirPyTech

Copy link
Copy Markdown

The check was added in OCA/pylint-odoo#304, then has been removed in OCA/pylint-odoo#396 because it was supposedly checked by https://github.com/OCA/odoo-pre-commit-hooks, but I can't find such check.

@moylop260 looks like you are involved in all the related changes, please let me know what you think.

@SirPyTech SirPyTech force-pushed the no-format-translation branch from 06fb704 to 8d263e5 Compare June 9, 2026 08:46
@SirPyTech SirPyTech force-pushed the no-format-translation branch from 8d263e5 to 644438d Compare June 9, 2026 09:16
@SirPyTech SirPyTech marked this pull request as ready for review June 9, 2026 09:17
@moylop260

moylop260 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Hi @SirPyTech

Good catch!

Checking why this check was removed, I have found the following main issue:

Notice the following note:

check action reference Notes
str-format-used deprecate   py3 fix the errors related to str.format method

I think I was confused with the following prefer-other-formatting case

But the no-translation-format is a different issue related to security using format

So, I think it is valid to have it and it should not be deleted from pylint-odoo since that AST python processing is managed from pylint-odoo instead of odoo-pre-commit-hooks

Could you migrate it to pylint-odoo, please?

@moylop260 moylop260 closed this Jun 10, 2026
@moylop260

Copy link
Copy Markdown
Collaborator

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