Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pylint & #!
#1
Hi all. I've got code that looks like:

#! /usr/bin/python3
'''
A script that does stuff
'''
from lib.utils import thingy
And pylint says:

Error:
E0611: No name 'utils' in module 'lib' (no-name-in-module
Even though the script works fine. (There's a lib dir inside my CWD that contains utils.py)

If I remove the
#! /usr/bin/python3
pylint stops complaining.

Does anyone know why this might be?

Thanks!
Reply
#2
I have Linux Debian:

There is pylint for Python2.x
and pylint3 for Python3.x

apt install pylint
apt install pylint3

With pylint3 your code should lint OK.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pylint more Fast leandrogmuller 2 2,159 Oct-20-2020, 05:21 PM
Last Post: leandrogmuller
  pylint not recognizing some objects in VS Code marceloreborn 1 1,765 Jul-31-2020, 01:36 AM
Last Post: Larz60+
  pylint question dcollett 0 1,520 Mar-26-2020, 08:49 PM
Last Post: dcollett
  Pylint/pyflakes/flake8 missed AttributeError elyoni 2 1,815 Feb-19-2020, 07:36 AM
Last Post: elyoni
  Pylint Statment Count Shangeetha 1 2,005 Dec-22-2019, 04:58 PM
Last Post: Larz60+
  redefinition of a method in a class: pylint warning kboo 1 4,210 Feb-13-2018, 11:21 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020