For consistency, add tox env for running isort in python common.
Basically copies the tox.ini config.
Like pybind/mgr this is 'opt in' so we only initially have the smb
module listed here.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
deps = {[black]deps}
commands =
black {[black]options} {[black]modules}
+
+
+# OPT-IN import style formatting with 'isort'
+# add your module to the modules list below to use automated import sorting
+[isortcfg]
+deps = isort
+modules = ceph/smb
+
+[isort]
+profile = black
+line_length = 78
+known_first_party = ceph,rados,rbd,cephfs,mgr
+known_typing = typing
+sections = FUTURE,TYPING,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
+
+[testenv:check-isort]
+deps = {[isortcfg]deps}
+commands =
+ isort --check-only {[isortcfg]modules}
+
+[testenv:format-isort]
+deps = {[isortcfg]deps}
+commands =
+ isort {[isortcfg]modules}