python310Packages.flake8-import-order: switch to pytestCheckHook
- add pythonImportsCheck - disable on unsupported Python releases
This commit is contained in:
parent
0167b31088
commit
81b938da81
|
@ -1,30 +1,39 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, isPy3k
|
||||
, enum34
|
||||
, pycodestyle
|
||||
, pytest
|
||||
, flake8
|
||||
, pycodestyle
|
||||
, pylama
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "flake8-import-order";
|
||||
version = "0.18.2";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-4jlB+JLaPgwJ1xG6u7DHO8c1JC6bIWtyZhZ1ipINkA4=";
|
||||
hash = "sha256-4jlB+JLaPgwJ1xG6u7DHO8c1JC6bIWtyZhZ1ipINkA4=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ pycodestyle ] ++ lib.optional (!isPy3k) enum34;
|
||||
propagatedBuildInputs = [
|
||||
pycodestyle
|
||||
];
|
||||
|
||||
checkInputs = [ pytest flake8 pycodestyle pylama ];
|
||||
checkInputs = [
|
||||
flake8
|
||||
pycodestyle
|
||||
pylama
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
pytest --strict
|
||||
'';
|
||||
pythonImportsCheck = [
|
||||
"flake8_import_order"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Flake8 and pylama plugin that checks the ordering of import statements";
|
||||
|
|
Loading…
Reference in a new issue