question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pylint passes locally but fails in Github actions

See original GitHub issue

What happened:

Check out https://github.com/gleitz/howdoi/pull/433/checks?check_run_id=3861232824

The pylint tests fail in Github actions but pass locally (with the same version of pylint).

Locally:

» python setup.py lint
running lint

Running Flake8...
No lint errors found by Flake8

Running Pylint...

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

No lint errors found by Pylint

» pylint --version
pylint 2.11.1
astroid 2.8.0
Python 3.9.7 (default, Sep 20 2021, 08:30:41)
[Clang 12.0.0 (clang-1200.0.32.29)]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
gleitzcommented, Oct 18, 2021

I think we should do three things:

  • Unify the version of Pylint (2.11.1) (in requirements/dev.txt)
  • Make sure that all pylint command use pylint howdoi *.py --rcfile=.pylintrc (in setup.py and .pre-commit-config.yaml and .github/workflows/python-non-master.yml and .github/workflows/python.yml)
  • Pin the version of pylint used by the github action (.github/workflows/python-non-master.yml and .github/workflows/python.yml)

@V2dha

1reaction
gleitzcommented, Oct 22, 2021

Two options here - we can uninstall pylint globally or use the virtual environment’s python to run pylint.

Let’s try the latter first.

For me, I can find my local python with which python

» which python
/Users/gleitz/.virtualenvs/howdoi/bin/python

Then I can run pylint using this local version of python

» python -m pylint howdoi *.py --rcfile=.pylintrc

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

This should avoid the import-errors.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pylint fail under does not fail my Github action job
I think you should try running pylint locally without github actions, to see if the command work out of the github actions.
Read more >
Test passes, but doesn't on GitHub via GitHub actions
Hi! So lately I've noticed that my GitHub action test suite has begun to fail, which I initially tracked down to failing test...
Read more >
[ESLint] Passes locally but fails in CI : r/typescript - Reddit
Edit: Solved - I was accidentally using a linked local version of "type-fest" (as I was working on PR for it and testing...
Read more >
GitHub Actions Continuous Integration - SpECTRE
Troubleshooting · Occasionally, a build job will fail because of a problem with GitHub Actions (e.g. it times out). On the Checks tab...
Read more >
GitHub Actions Test Automation CI Pipeline & Reporting
Or to run our tests locally during development to see if they pass. ... This way you can try both full passes and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found