8000 Bump dependencies by diraol · Pull Request #1170 · python-mode/python-mode · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@diraol
Copy link
Contributor
@diraol diraol commented Jun 24, 2023

Updating our submodules and trying to fix the errors that are showing up.

Also improve the shell scripts tests by linting the files and improving the visual output.

@diraol diraol force-pushed the dro/bump_dependencies branch 2 times, most recently from f044986 to 72568d6 Compare June 24, 2023 05:16
@diraol diraol force-pushed the dro/bump_dependencies branch from 72568d6 to a4731b4 Compare June 24, 2023 18:56
@diraol
Copy link
Contributor Author
diraol commented Jun 24, 2023

Hey folks, I need some help here, there is an error happening on the tests but I couldn't figure out how to solve it.

Any help here is very welcome!

@diraol
Copy link
Contributor Author
diraol commented Jun 27, 2023

@lieryan wanna help here?

@lieryan
Copy link
Contributor
lieryan commented Jun 28, 2023

I was looking into this, and I think I found the issue.

On current develop, when running pylama, the pylama options looks like this:

Namespace(
    ...
    linters=[
        ('pyflakes', <pylama.lint.pylama_pyflakes.Linter object at 0x7f088d4120b0>),
        ('pep8', <pylama.lint.pylama_pycodestyle.Linter object at 0x7f088d412890>),
        ('mccabe', <pylama.lint.pylama_mccabe.Linter object at 0x7f088d412410>),
    ],
    ...
)

but using the updated version in the PR, the options looks like this:

Namespace(
    ...
    linters=[
        'pyflakes',
        'mccabe',
    ],
    ...
)

the format of how this options has been parsed has changed a bit, but that is not the issue. The issue is that linters list no longer have pep8 in the list of enabled linters. A little bit of research shows that it seems that pep8 has long been renamed to pycodestyle, but pylama continues to accept pep8 name for a while. Some time during pylama 7.7.1 and 8.4.1, the compatibility code that had allowed using pep8 name in pylama has finally been removed and that breaks the test, as now pycodestyle/pep8 linters are no longer running.

A quick fix for the test is to do something like:

diff --git a/pymode/lint.py b/pymode/lint.py
index c530404..56208a6 100644
--- a/pymode/lint.py
+++ b/pymode/lint.py
@@ -42,6 +42,10 @@ def code_check():
             raise ValueError('g:pymode_lint_select should have a list type')
         else:
             select = env.var('g:pymode_lint_select')
+        if 'pep8' in linters:
+            ## maybe add user-visible deprecation warning here
+            linters.remove('pep8')
+            linters.append('pycodestyle')
         options = parse_options(
             linters=linters, force=1,
             ignore=ignore,

this would make the test passes, but it would break the g:pymode_lint_options_pep8 config options, we should rename this option to g:pymode_lint_options_pycodestyle so there are a number of other places that needs to be fixed as well.

@diraol diraol merged commit 57384b9 into develop Jul 3, 2023
@diraol diraol deleted the dro/bump_dependencies branch July 3, 2023 01:39
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.

3 participants

0