Python Forum

Full Version: pylint & #!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
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.