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] Detected use exec, eval and inferred cases #100

Merged

Conversation

JesusZapata
Copy link

Referend to issue #98

Copy link

@moylop260 moylop260 left a 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({

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

Copy link
Author

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.

Copy link

@moylop260 moylop260 left a 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.',

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?

Copy link
Author

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.

@moylop260
Copy link

FYI many times a travis is red because a unrelated case.
I rebuilt the last stable branch build in order to detect a red too:
https://travis-ci.org/Vauxoo/pylint-odoo/builds/187509939

If this build is red, then is a unrelated case.
If this build is green, then is a issue particular for this PR.

@moylop260 moylop260 merged commit 5283ca8 into Vauxoo:master Dec 30, 2016
@moylop260 moylop260 deleted the master-detected-eval-referenced-jesuszapata branch December 30, 2016 06:30
@moylop260
Copy link

Merged thanks!
(Tomorrow, could you migrated the sha 5283ca8 for oca project with a cherry-pick and create PR?)

@moylop260
Copy link

Use the same commit message for oca pr.
Your commit message of oca pr is "fixing conflicts"

@JesusZapata
Copy link
Author

Done ! Check it out!

JesusZapata pushed a commit to vauxoo-dev/pylint-odoo that referenced this pull request Jan 30, 2017
JesusZapata pushed a commit to vauxoo-dev/pylint-odoo that referenced this pull request Jan 31, 2017
[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
JesusZapata pushed a commit to vauxoo-dev/pylint-odoo that referenced this pull request Jan 31, 2017
[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
moylop260 added a commit to vauxoo-dev/pylint-odoo that referenced this pull request Feb 20, 2023
…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.
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.

None yet

2 participants