← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:isort-config into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:isort-config into launchpad:master.

Commit message:
Add isort configuration

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/406589

This isn't yet enabled in pre-commit, but this gives us a common base to work from to clean up lint.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:isort-config into launchpad:master.
diff --git a/setup.cfg b/setup.cfg
index c856fa8..149b9e9 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -58,3 +58,18 @@ ignore =
     # operators, at least for now.
     W503,
     W504
+
+[isort]
+combine_as_imports = true
+force_grid_wrap = 2
+force_sort_within_sections = true
+include_trailing_comma = true
+# database/* have some implicit relative imports.
+known_first_party = canonical,lp,launchpad_loggerhead,devscripts,fti,replication,preflight,security,upgrade,dbcontroller
+known_pythonpath = _pythonpath
+line_length = 78
+lines_after_imports = 2
+multi_line_output = 8
+order_by_type = false
+sections = FUTURE,PYTHONPATH,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
+skip_gitignore = true