-
Notifications
You must be signed in to change notification settings - Fork 4
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] Detected use exec, eval and inferred cases #100
[IMP] Detected use exec, eval and inferred cases #100
Conversation
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.
LGTM just small change
@@ -213,6 +213,13 @@ | |||
), | |||
}) | |||
|
|||
ODOO_MSGS.update({ |
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.
The special variable ODOO_MSGS
is used for "Checks not oca just vx to avoid oca conflicts" (see comment above)
But for this check will be migrated to OCA project, then you could use the default global variable ODOO_MSGS
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.
Ok, I moved the code to the top definition.
…tected-eval-referenced-jesuszapata
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.
Wait... travis is red.
Could you check it, please?
@@ -213,6 +213,13 @@ | |||
), | |||
}) | |||
|
|||
ODOO_MSGS.update({ | |||
'W%d12' % settings.BASE_NOMODULE_ID: ( | |||
'Eval referenced.', |
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.
eval is a method name, then we should use without uppercase transformation.
What about "eval" referenced
?
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.
Ok, fix de comment and add "eval" referenced detected.
FYI many times a travis is red because a unrelated case. If this build is red, then is a unrelated case. |
Merged thanks! |
Use the same commit message for oca pr. |
Done ! Check it out! |
…l to variable name (Vauxoo#100)
[FIX] pylint-odoo: Best use of if clause [FIX] pylint-odoo: Validate the body contain only one line [FIX] pylint-odoo: Avoid use \ better use ( [REF] incoherent-interpreter-exec-perm: Better message (Vauxoo#106) [ADD] xml-attribute-translatable: Check XML attribute without translation parameter (Vauxoo#105) Close OCA#104 [REF] javascript-lint: Use eslint instead of jshint (Vauxoo#97) [ADD] renamed-field-parameter: Detect deprecated field values (digits_compute, select) (Vauxoo#99) [FIX] Pep8 check and bad index for ODOO_MSGS [ADD] attribute-string-redundant: Check if "string" parameter is equal to variable name (Vauxoo#100) [FIX] attribute-string-redundant: Add "isinstance" validation for nodes Fix OCA#109 [IMP] Exclude exception when use as assignation [FIX] Pep8 check local variable 'exception' [FIX] Pep8 blank line at end of file [FIX] Adding more cases of test [REF] Supporting more cases of exception [FIX] Modify file main.py for adding new case of except-pass [IMP] Adding another tests case [FIX] Adding another test case and better validation [FIX] Delete unnecessary condition of if [FIX] Fix comment line
[FIX] pylint-odoo: Best use of if clause [FIX] pylint-odoo: Validate the body contain only one line [FIX] pylint-odoo: Avoid use \ better use ( [REF] incoherent-interpreter-exec-perm: Better message (Vauxoo#106) [ADD] xml-attribute-translatable: Check XML attribute without translation parameter (Vauxoo#105) Close OCA#104 [REF] javascript-lint: Use eslint instead of jshint (Vauxoo#97) [ADD] renamed-field-parameter: Detect deprecated field values (digits_compute, select) (Vauxoo#99) [FIX] Pep8 check and bad index for ODOO_MSGS [ADD] attribute-string-redundant: Check if "string" parameter is equal to variable name (Vauxoo#100) [FIX] attribute-string-redundant: Add "isinstance" validation for nodes Fix OCA#109 [IMP] Exclude exception when use as assignation [FIX] Pep8 check local variable 'exception' [FIX] Pep8 blank line at end of file [FIX] Adding more cases of test [REF] Supporting more cases of exception [FIX] Modify file main.py for adding new case of except-pass [IMP] Adding another tests case [FIX] Adding another test case and better validation [FIX] Delete unnecessary condition of if [FIX] Fix comment line
…figuration is invalid Vauxoo#100 Fixing the following traceback for a new environment: `python3.10 -m tox -e lint` lint: commands[0]> pre-commit run --all-files --show-diff-on-failure --color=always [INFO] Installing environment for https://github.com/PyCQA/isort. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... An unexpected error has occurred: CalledProcessError: command: ('~/.cache/pre-commit/repotkw2xyso/py_env-python3/bin/python', '-mpip', 'install', '.') return code: 1 stdout: Processing ~/.cache/pre-commit/repotkw2xyso Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'error' stderr: error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [14 lines of output] Traceback (most recent call last): File "~/.cache/pre-commit/repotkw2xyso/py_env-python3/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "~/.cache/pre-commit/repotkw2xyso/py_env-python3/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "~/.cache/pre-commit/repotkw2xyso/py_env-python3/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "/private/var/folders/4r/jsj0bs210jbd57v0zbfk5xx40000gn/T/pip-build-env-dgcj3jmu/overlay/lib/python3.10/site-packages/poetry/core/masonry/api.py", line 40, in prepare_metadata_for_build_wheel poetry = Factory().create_poetry(Path(".").resolve(), with_groups=False) File "/private/var/folders/4r/jsj0bs210jbd57v0zbfk5xx40000gn/T/pip-build-env-dgcj3jmu/overlay/lib/python3.10/site-packages/poetry/core/factory.py", line 57, in create_poetry raise RuntimeError("The Poetry configuration is invalid:\n" + message) RuntimeError: The Poetry configuration is invalid: - [extras.pipfile_deprecated_finder.2] 'pip-shims<=0.3.4' does not match '^[a-zA-Z-_.0-9]+$' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
Referend to issue #98