Coder Social home page Coder Social logo

Comments (6)

gleitz avatar gleitz commented on June 28, 2024 3

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

from howdoi.

gleitz avatar gleitz commented on June 28, 2024 1

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.

from howdoi.

Prateek93a avatar Prateek93a commented on June 28, 2024

The pre-commit is configured to use pylint 2.8.2 which does not give error but pylint 2.11.1 gives the error. You can try it by running pylint howdoi --rcfile=.pylintrc.

Can you check the output of which pylint to see if it from your virtual environment or the global one?

from howdoi.

V2dha avatar V2dha commented on June 28, 2024

These are import errors given by Pylint (2.11.1) upon running pylint howdoi *.py --rcfile=.pylintrc

1

and upon running python3 setup.py lint it only checks the howdoi directory

2

Development Environment

3

from howdoi.

gleitz avatar gleitz commented on June 28, 2024

It's strange that it's mostly import errors - it's almost as if Pylint is not using the virtual environment or something like that.

from howdoi.

V2dha avatar V2dha commented on June 28, 2024

It's strange that it's mostly import errors - it's almost as if Pylint is not using the virtual environment or something like that.

Upon checking which pylint in the development environment, it is not considering the virtual environment on my system.

from howdoi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.