-
Notifications
You must be signed in to change notification settings - Fork 6
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] Update pre-commit to current OCA standards, dob compatible #1
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,20 @@ load-plugins=pylint_odoo | |
score=n | ||
|
||
[ODOOLINT] | ||
readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst" | ||
manifest_required_keys=license | ||
manifest_deprecated_keys=description,active | ||
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 | ||
|
||
[MESSAGES CONTROL] | ||
disable=all | ||
|
||
# This .pylintrc contains optional AND mandatory checks and is meant to be | ||
# loaded in an IDE to have it check everything, in the hope this will make | ||
# optional checks more visible to contributors who otherwise never look at a | ||
# green travis to see optional checks that failed. | ||
# .pylintrc-mandatory containing only mandatory checks is used the pre-commit | ||
# config as a blocking check. | ||
|
||
enable=anomalous-backslash-in-string, | ||
api-one-deprecated, | ||
api-one-multi-together, | ||
|
@@ -19,6 +25,7 @@ enable=anomalous-backslash-in-string, | |
class-camelcase, | ||
dangerous-default-value, | ||
dangerous-view-replace-wo-priority, | ||
development-status-allowed, | ||
duplicate-id-csv, | ||
duplicate-key, | ||
duplicate-xml-fields, | ||
|
@@ -35,8 +42,6 @@ enable=anomalous-backslash-in-string, | |
method-inverse, | ||
method-required-super, | ||
method-search, | ||
missing-import-error, | ||
missing-manifest-dependency, | ||
openerp-exception-warning, | ||
pointless-statement, | ||
pointless-string-statement, | ||
|
@@ -54,7 +59,56 @@ enable=anomalous-backslash-in-string, | |
unreachable, | ||
use-vim-comment, | ||
wrong-tabs-instead-of-spaces, | ||
xml-syntax-error | ||
xml-syntax-error, | ||
attribute-string-redundant, | ||
character-not-valid-in-resource-link, | ||
consider-merging-classes-inherited, | ||
context-overridden, | ||
create-user-wo-reset-password, | ||
dangerous-filter-wo-user, | ||
dangerous-qweb-replace-wo-priority, | ||
deprecated-data-xml-node, | ||
deprecated-openerp-xml-node, | ||
duplicate-po-message-definition, | ||
except-pass, | ||
file-not-used, | ||
invalid-commit, | ||
manifest-maintainers-list, | ||
missing-newline-extrafiles, | ||
missing-readme, | ||
missing-return, | ||
odoo-addons-relative-import, | ||
old-api7-method-defined, | ||
po-msgstr-variables, | ||
po-syntax-error, | ||
renamed-field-parameter, | ||
resource-not-exist, | ||
str-format-used, | ||
test-folder-imported, | ||
translation-contains-variable, | ||
translation-positional-used, | ||
unnecessary-utf8-coding-comment, | ||
website-manifest-key-not-valid-uri, | ||
xml-attribute-translatable, | ||
xml-deprecated-qweb-directive, | ||
xml-deprecated-tree-attribute, | ||
# messages that do not cause the lint step to fail | ||
consider-merging-classes-inherited, | ||
create-user-wo-reset-password, | ||
dangerous-filter-wo-user, | ||
deprecated-module, | ||
file-not-used, | ||
invalid-commit, | ||
missing-manifest-dependency, | ||
missing-newline-extrafiles, | ||
missing-readme, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one is duplicated and breaking because we don't want to enforce readme's for internal modules. Potentially some of the |
||
no-utf8-coding-comment, | ||
odoo-addons-relative-import, | ||
old-api7-method-defined, | ||
redefined-builtin, | ||
too-complex, | ||
unnecessary-utf8-coding-comment | ||
|
||
|
||
[REPORTS] | ||
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
[MASTER] | ||
load-plugins=pylint_odoo | ||
score=n | ||
|
||
[ODOOLINT] | ||
manifest_required_keys=license | ||
manifest_deprecated_keys=description,active | ||
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3 | ||
|
||
[MESSAGES CONTROL] | ||
disable=all | ||
|
||
enable=anomalous-backslash-in-string, | ||
api-one-deprecated, | ||
api-one-multi-together, | ||
assignment-from-none, | ||
attribute-deprecated, | ||
class-camelcase, | ||
dangerous-default-value, | ||
dangerous-view-replace-wo-priority, | ||
development-status-allowed, | ||
duplicate-id-csv, | ||
duplicate-key, | ||
duplicate-xml-fields, | ||
duplicate-xml-record-id, | ||
eval-referenced, | ||
eval-used, | ||
incoherent-interpreter-exec-perm, | ||
license-allowed, | ||
manifest-author-string, | ||
manifest-deprecated-key, | ||
manifest-required-key, | ||
manifest-version-format, | ||
method-compute, | ||
method-inverse, | ||
method-required-super, | ||
method-search, | ||
openerp-exception-warning, | ||
pointless-statement, | ||
pointless-string-statement, | ||
print-used, | ||
redundant-keyword-arg, | ||
redundant-modulename-xml, | ||
reimported, | ||
relative-import, | ||
return-in-init, | ||
rst-syntax-error, | ||
sql-injection, | ||
too-few-format-args, | ||
translation-field, | ||
translation-required, | ||
unreachable, | ||
use-vim-comment, | ||
wrong-tabs-instead-of-spaces, | ||
xml-syntax-error, | ||
attribute-string-redundant, | ||
character-not-valid-in-resource-link, | ||
consider-merging-classes-inherited, | ||
context-overridden, | ||
create-user-wo-reset-password, | ||
dangerous-filter-wo-user, | ||
dangerous-qweb-replace-wo-priority, | ||
deprecated-data-xml-node, | ||
deprecated-openerp-xml-node, | ||
duplicate-po-message-definition, | ||
except-pass, | ||
file-not-used, | ||
invalid-commit, | ||
manifest-maintainers-list, | ||
missing-newline-extrafiles, | ||
missing-readme, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
missing-return, | ||
odoo-addons-relative-import, | ||
old-api7-method-defined, | ||
po-msgstr-variables, | ||
po-syntax-error, | ||
renamed-field-parameter, | ||
resource-not-exist, | ||
str-format-used, | ||
test-folder-imported, | ||
translation-contains-variable, | ||
translation-positional-used, | ||
unnecessary-utf8-coding-comment, | ||
website-manifest-key-not-valid-uri, | ||
xml-attribute-translatable, | ||
xml-deprecated-qweb-directive, | ||
xml-deprecated-tree-attribute | ||
|
||
[REPORTS] | ||
msg-template={path}:{line}: [{msg_id}({symbol}), {obj}] {msg} | ||
output-format=colorized | ||
reports=no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This black version has currently heavy problems with the current click version. I guess some of the CI for the OCA might be also influenced by this.
psf/black#2964
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this @dreispt @azoellner @fkantelberg is that stale or can this be fixed and merged somewhen soon