python3Packages.autoflake: depend on tomli for older pythons

As you can see in https://github.com/PyCQA/autoflake/pull/138, TOML support is added using python 3.11's builtin `tomllib`. However, for older Python versions, they use `tomli`. Thus, it must be included for those versions.

@moduon MT-2798
This commit is contained in:
Jairo Llopis 2023-04-24 10:24:10 +01:00
parent b394a31dd2
commit 09dd617e1f
No known key found for this signature in database
GPG key ID: E47E3BE44B940490

View file

@ -4,8 +4,9 @@
, hatchling
, pyflakes
, pytestCheckHook
, pythonOlder
, tomli
}:
buildPythonPackage rec {
pname = "autoflake";
version = "2.0.1";
@ -22,7 +23,8 @@ buildPythonPackage rec {
propagatedBuildInputs = [
pyflakes
];
]
++ lib.optional (pythonOlder "3.11") tomli;
nativeCheckInputs = [
pytestCheckHook