Skip to content

QuentinN42/pylint_absolute_imports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pylint force absolute imports plugin

What for?

Following PEP8 recommendation about imports, import statements should be absolute :

Standard library code should avoid complex package layouts and always use absolute imports.

# project/
# |---- __init__.py
# |---- employee.py

from .employee import Employee  # <- BAD
from project.employee import Employee  # <- Good

Installation

pip install pylint_absolute_imports

Usage

In pylint.rc:

[MASTER]
load-plugins=pylint_absolute_imports

Or, in terminal:

pylint --load-plugins pylint_absolute_imports foo.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •