2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
astroid,
|
|
|
|
buildPythonPackage,
|
|
|
|
dill,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gitpython,
|
|
|
|
isort,
|
|
|
|
mccabe,
|
|
|
|
platformdirs,
|
|
|
|
py,
|
|
|
|
pytest-timeout,
|
|
|
|
pytest-xdist,
|
|
|
|
pytest7CheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
setuptools,
|
|
|
|
tomli,
|
|
|
|
tomlkit,
|
|
|
|
typing-extensions,
|
2021-03-19 17:17:44 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pylint";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "3.2.3";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
src = fetchFromGitHub {
|
2023-08-22 20:05:09 +00:00
|
|
|
owner = "pylint-dev";
|
2024-01-13 08:15:51 +00:00
|
|
|
repo = "pylint";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-J+68YwjVhaMPlvLCMI/BdnUCQPDYU9u0pIvOYlbzWvs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies =
|
|
|
|
[
|
|
|
|
astroid
|
|
|
|
dill
|
|
|
|
isort
|
|
|
|
mccabe
|
|
|
|
platformdirs
|
|
|
|
tomlkit
|
|
|
|
]
|
|
|
|
++ lib.optionals (pythonOlder "3.11") [ tomli ]
|
|
|
|
++ lib.optionals (pythonOlder "3.10") [ typing-extensions ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-12-17 10:02:37 +00:00
|
|
|
gitpython
|
2022-04-27 09:35:20 +00:00
|
|
|
# https://github.com/PyCQA/pylint/blob/main/requirements_test_min.txt
|
2023-01-20 10:41:00 +00:00
|
|
|
py
|
2022-04-27 09:35:20 +00:00
|
|
|
pytest-timeout
|
2021-03-19 17:17:44 +00:00
|
|
|
pytest-xdist
|
2024-04-21 15:54:59 +00:00
|
|
|
pytest7CheckHook
|
2022-12-17 10:02:37 +00:00
|
|
|
requests
|
2022-04-27 09:35:20 +00:00
|
|
|
typing-extensions
|
2021-03-19 17:17:44 +00:00
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# DeprecationWarning: pyreverse will drop support for resolving and
|
|
|
|
# displaying implemented interfaces in pylint 3.0. The
|
|
|
|
# implementation relies on the '__implements__' attribute proposed
|
|
|
|
# in PEP 245, which was rejected in 2006.
|
2024-05-15 15:35:15 +00:00
|
|
|
"-W"
|
|
|
|
"ignore::DeprecationWarning"
|
2023-08-10 07:59:29 +00:00
|
|
|
"-v"
|
2023-03-15 16:39:30 +00:00
|
|
|
];
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
dontUseSetuptoolsCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
preCheck = ''
|
2021-12-26 17:43:05 +00:00
|
|
|
export HOME=$TEMPDIR
|
2020-06-15 15:56:04 +00:00
|
|
|
'';
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
disabledTestPaths = [
|
2022-06-16 17:23:12 +00:00
|
|
|
"tests/benchmark"
|
2021-09-18 10:52:07 +00:00
|
|
|
# tests miss multiple input files
|
|
|
|
# FileNotFoundError: [Errno 2] No such file or directory
|
|
|
|
"tests/pyreverse/test_writer.py"
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# AssertionError when self executing and checking output
|
|
|
|
# expected output looks like it should match though
|
|
|
|
"test_invocation_of_pylint_config"
|
|
|
|
"test_generate_rcfile"
|
|
|
|
"test_generate_toml_config"
|
|
|
|
"test_help_msg"
|
|
|
|
"test_output_of_callback_options"
|
|
|
|
# Failed: DID NOT WARN. No warnings of type (<class 'UserWarning'>,) were emitted. The list of emitted warnings is: [].
|
|
|
|
"test_save_and_load_not_a_linter_stats"
|
|
|
|
# Truncated string expectation mismatch
|
|
|
|
"test_truncated_compare"
|
|
|
|
# Probably related to pytest versions, see pylint-dev/pylint#9477 and pylint-dev/pylint#9483
|
|
|
|
"test_functional"
|
|
|
|
# AssertionError: assert [('specializa..., 'Ancestor')] == [('aggregatio..., 'Ancestor')]
|
|
|
|
"test_functional_relation_extraction"
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
"test_parallel_execution"
|
|
|
|
"test_py3k_jobs_option"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Bug and style checker for Python";
|
2024-05-15 15:35:15 +00:00
|
|
|
homepage = "https://pylint.readthedocs.io/en/stable/";
|
2024-01-13 08:15:51 +00:00
|
|
|
changelog = "https://github.com/pylint-dev/pylint/releases/tag/v${version}";
|
2022-05-18 14:49:53 +00:00
|
|
|
longDescription = ''
|
|
|
|
Pylint is a Python static code analysis tool which looks for programming errors,
|
|
|
|
helps enforcing a coding standard, sniffs for code smells and offers simple
|
|
|
|
refactoring suggestions.
|
|
|
|
Pylint is shipped with following additional commands:
|
|
|
|
- pyreverse: an UML diagram generator
|
|
|
|
- symilar: an independent similarities checker
|
|
|
|
- epylint: Emacs and Flymake compatible Pylint
|
|
|
|
'';
|
2024-05-15 15:35:15 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|