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

Pin isort to restore the lint step in CI #291

Merged
merged 3 commits into from
Jul 18, 2020

Conversation

krassowski
Copy link
Member

@krassowski krassowski commented Jul 18, 2020

References

#290 shows a failure in the lint step (all the actual tests pass ok). The root cause seems to be a recent release of isort (5.0) which affects nblint and pylint. Until both have migrated to isort 5.0 the proposed solution is to pin isort <5.

Upstream/root issues:

 robot --name Linux37 --outputdir /home/vsts/work/1/s/atest/output/dry_run_linux_37_1 --output /home/vsts/work/1/s/atest/output/dry_run_linux_37_1.robot.xml --log /home/vsts/work/1/s/atest/output/dry_run_linux_37_1.log.html --report /home/vsts/work/1/s/atest/output/dry_run_linux_37_1.report.html --xunitskipnoncritical --xunit /home/vsts/work/1/s/atest/output/dry_run_linux_37_1.xunit.xml --variable OS:Linux --variable PY:37 --randomize all --dryrun --console quiet --noncritical language:yamlANDfeature:config --noncritical language:pythonANDpy:36ANDos:windows /home/vsts/work/1/s/atest
0 errors in 2 seconds
..Traceback (most recent call last):
  File "scripts/nblint.py", line 87, in <module>
    sys.exit(nblint())
  File "scripts/nblint.py", line 64, in nblint
    new = isort.SortImports(file_contents=source).output
AttributeError: module 'isort' has no attribute 'SortImports'

Code changes

Pin isort in:

  • binder/environment.yml
  • requirements/lint.yml

User-facing changes

None

Backwards-incompatible changes

None

Chores

  • linted
  • tested
  • documented
  • changelog entry

@bollwyvl bollwyvl self-requested a review July 18, 2020 19:27
Copy link
Collaborator

@bollwyvl bollwyvl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

# isort 5.0 has breaking API changes which affect (among others) pylint and nblint;
# the pin should be removed once https://github.com/PyCQA/pylint/pull/3725 is merged
# see https://github.com/krassowski/jupyterlab-lsp/pull/291
- isort <5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 have had to do this in some other places.

@krassowski krassowski merged commit bcf0ede into master Jul 18, 2020
@krassowski krassowski deleted the krassowski-lint-ci-isort-pin-5 branch September 4, 2020 16:19
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