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

Pylint behaves differently on Mac vs Linux #3068

Open
khawley opened this issue Aug 15, 2019 · 2 comments
Open

Pylint behaves differently on Mac vs Linux #3068

khawley opened this issue Aug 15, 2019 · 2 comments
Labels
Bug 🪲 macOS Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning

Comments

@khawley
Copy link

khawley commented Aug 15, 2019

Summary

Pylint is behaving differently based on different operating systems. On Mac it is throwing a not-callable and on Linux, it is throwing a no-member.

Steps to reproduce

  1. Git clone the repo here that has been pared down to the simplest reproducible form.
  2. Follow the instructions listed in the readme to setup a virtualenv + install pylint.
  3. Running the specific pylint command will give different pylint errors based on operating system.

Current behavior

The attached table on the repo's readme shows the varying results across pylint, python, and os versions.

On Linux, running in virtualenv with python 3.6.8

$ pylint --version                   
pylint 2.3.0
astroid 2.2.5
Python 3.6.8 (default, Aug 15 2019, 13:29:58) 
[GCC 9.1.0]
$ pylint sub/main_folder/main_file.py
************* Module sub.main_folder.main_file
sub/main_folder/main_file.py:6:0: E1101: Module 'sub.other_folder.module' has no 'Module' member (no-member)

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

On Mac, running in virtualenv with python 3.6.8

» pylint --version
pylint 2.3.0
astroid 2.2.5
Python 3.6.8 (default, Jul 22 2019, 12:29:26)
[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)]
» pylint sub/main_folder/main_file.py
************* Module sub.main_folder.main_file
sub/main_folder/main_file.py:6:0: E1102: module.Module is not callable (not-callable)

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

Expected behavior

It should give the same error everywhere.

@PCManticore
Copy link
Contributor

Thanks for the clear reproduction examples, I appreciate it.

@Pierre-Sassoulas
Copy link
Member

I don't have a mac on hand but I can reproduce on ubuntu:

git clone git@github.com:khawley/pylint-repro.git
pylint pylint-repro --recursive=y

The result is the following:

************* Module sub.main_folder.main_file
pylint-repro/sub/main_folder/main_file.py:6:0: E1101: Module 'sub.other_folder.module' has no 'Module' member (no-member)
************* Module sub.module.module
pylint-repro/sub/module/module.py:1:0: W0611: Unused module imported from other_folder (unused-import)

-----------------------------------
Your code has been rated at 0.00/10

Maybe doing #4759 would help there.

@Pierre-Sassoulas Pierre-Sassoulas added the Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning label Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🪲 macOS Needs investigation 🔬 A bug or crash where it's not immediately obvious what is happenning
Projects
None yet
Development

No branches or pull requests

3 participants