24 buildPythonPackage rec {
29 disabled = pythonOlder "3.8";
31 src = fetchFromGitHub {
34 rev = "refs/tags/v${version}";
35 hash = "sha256-b3KkSgTmN6ojMJaVQGwvHIa41M2eZS9prxcL5peX/xU=";
38 build-system = [ setuptools ];
49 ++ lib.optionals (pythonOlder "3.11") [ tomli ]
50 ++ lib.optionals (pythonOlder "3.10") [ typing-extensions ];
54 # https://github.com/PyCQA/pylint/blob/main/requirements_test_min.txt
64 # DeprecationWarning: pyreverse will drop support for resolving and
65 # displaying implemented interfaces in pylint 3.0. The
66 # implementation relies on the '__implements__' attribute proposed
67 # in PEP 245, which was rejected in 2006.
69 "ignore::DeprecationWarning"
73 dontUseSetuptoolsCheck = true;
81 # tests miss multiple input files
82 # FileNotFoundError: [Errno 2] No such file or directory
83 "tests/pyreverse/test_writer.py"
88 # AssertionError when self executing and checking output
89 # expected output looks like it should match though
90 "test_invocation_of_pylint_config"
91 "test_generate_rcfile"
92 "test_generate_toml_config"
94 "test_output_of_callback_options"
95 # Failed: DID NOT WARN. No warnings of type (<class 'UserWarning'>,) were emitted. The list of emitted warnings is: [].
96 "test_save_and_load_not_a_linter_stats"
97 # Truncated string expectation mismatch
98 "test_truncated_compare"
99 # Probably related to pytest versions, see pylint-dev/pylint#9477 and pylint-dev/pylint#9483
101 # AssertionError: assert [('specializa..., 'Ancestor')] == [('aggregatio..., 'Ancestor')]
102 "test_functional_relation_extraction"
104 ++ lib.optionals stdenv.hostPlatform.isDarwin [
105 "test_parallel_execution"
106 "test_py3k_jobs_option"
110 description = "Bug and style checker for Python";
111 homepage = "https://pylint.readthedocs.io/en/stable/";
112 changelog = "https://github.com/pylint-dev/pylint/releases/tag/v${version}";
114 Pylint is a Python static code analysis tool which looks for programming errors,
115 helps enforcing a coding standard, sniffs for code smells and offers simple
116 refactoring suggestions.
117 Pylint is shipped with following additional commands:
118 - pyreverse: an UML diagram generator
119 - symilar: an independent similarities checker
120 - epylint: Emacs and Flymake compatible Pylint
122 license = lib.licenses.gpl2Plus;
124 mainProgram = "pylint";