pyproject: Make isort consistent across execution environments

In some cases, isort is not treating "plinth" module as a "first party" module.
It is then treated as a "third party" module and groups with non-standard python
libraries that we use. This behavior seems to dependent on from where isort is
run.

To eliminate this uncertainty, explicitly mark "plinth" module without depending
on automatic detection of isort. The two preferred ways to provide the
configuration are using .isort.cfg and pyproject.toml. The former introduces yet
another file in the project directory while the latter, a new python PEP,
promises to unify several other such configuration files.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2021-09-15 17:14:41 -07:00 committed by James Valleroy
parent 74214c18ae
commit dcb69b447b
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

2
pyproject.toml Normal file
View File

@ -0,0 +1,2 @@
[tool.isort]
known_first_party = ["plinth"]