flake8
jinjalint
nooptional
+ check-black
+ check-isort
skipsdist = true
skip_missing_interpreters = true
jinjaninja
commands =
jinja-ninja cephadm/templates
+
+
+# OPT-IN formatting with 'black'
+# add your module to the modules list below to use automated formatting
+[black]
+deps = black>=23,<24
+options = -l78 -t py36 --skip-string-normalization
+modules = smb
+
+[testenv:check-black]
+deps = {[black]deps}
+commands =
+ black --check -q {[black]options} {[black]modules}
+
+[testenv:format-black]
+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 = smb
+
+[isort]
+profile = black
+line_length = 78
+known_first_party = ceph,rados,rbd,cephfs,mgr,mgr_module,mgr_util,object_format
+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}