What is your application
shaped like?

$ lint-imports
.importlinter

Contract

$ lint-imports

=============
Import Linter
=============

---------
Contracts
---------

Analyzed 23 files, 44 dependencies.
-----------------------------------

My layer contract KEPT

Contracts: 1 kept, 0 broken.

 

 

 

 

 

 

 

 

 

 

$ lint-imports

=============
Import Linter
=============

---------
Contracts
---------

Analyzed 23 files, 44 dependencies.
-----------------------------------

My layer contract BROKEN

Contracts: 0 kept, 1 broken.

----------------
Broken contracts
----------------

My layer contract
-----------------

pets.cats is not allowed to import pets.dogs:

-   pets.cats.fur -> pets.utils (l.16)
    pets.utils -> pets.dogs.walkies (l.3)

 

[importlinter]
root_package = pets


[importlinter:contract:1]
name = My layers contract
type = layers
layers=
    dogs
    cats
    rabbits
containers=
    pets

 

 

 

 

 

This talk's slides:

slides.com/davidseddon/import-linter-demo

Packages
 

import-linter.readthedocs.io


 

Email: david@seddonym.me
Twitter: @seddonym
Blog: seddonym.me

 

Import Linter Demo

By David Seddon

Import Linter Demo

A lightning talk demoing Import Linter, a tool for imposing constraints on the imports in your python project.

  • 1,533