1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= python-mccabe
7 SDESC[v11]= McCabe checker, plugin for flake8 (3.11)
8 SDESC[v12]= McCabe checker, plugin for flake8 (3.12)
9 HOMEPAGE= https://github.com/pycqa/mccabe
10 CONTACT= Python_Automaton[python@ironwolf.systems]
13 SITES[main]= PYPIWHL/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9
14 DISTFILE[1]= mccabe-0.7.0-py2.py3-none-any.whl:main
19 OPTIONS_AVAILABLE= PY311 PY312
20 OPTIONS_STANDARD= none
21 VOPTS[v11]= PY311=ON PY312=OFF
22 VOPTS[v12]= PY311=OFF PY312=ON
24 DISTNAME= mccabe-0.7.0.dist-info
28 [PY311].USES_ON= python:v11,wheel
30 [PY312].USES_ON= python:v12,wheel
32 [FILE:2426:descriptions/desc.single]
33 McCabe complexity checker
34 =========================
36 Ned's script to check McCabe complexity.
38 This module provides a plugin for flake8, the Python code checker.
43 You can install, upgrade, or uninstall mccabe with these commands::
46 $ pip install --upgrade mccabe
47 $ pip uninstall mccabe
52 The complexity checker can be used directly::
54 $ python -m mccabe --min 5 mccabe.py
55 ("185:1: 'PathGraphingAstVisitor.visitIf'", 5)
56 ("71:1: 'PathGraph.to_dot'", 5)
57 ("245:1: 'McCabeChecker.run'", 5)
59 ("203:1: 'PathGraphingAstVisitor.visitTryExcept'", 5)
60 ("257:1: 'get_code_complexity'", 5)
65 When both ``flake8 2+ and mccabe`` are installed, the plugin is
69 2.0 (pep8: 1.4.2, pyflakes: 0.6.1, mccabe: 0.2)
71 By default the plugin is disabled. Use the ``--max-complexity`` switch to
72 enable it. It will emit a warning if the McCabe complexity of a function
74 higher than the provided value::
76 $ flake8 --max-complexity 10 coolproject
78 coolproject/mod.py:1204:1: C901 'CoolFactory.prepare' is too complex
81 This feature is quite useful for detecting over-complex code. According to
83 anything that goes beyond 10 is too complex.
85 Flake8 has many features that mccabe does not provide. Flake8 allows users
87 ignore violations reported by plugins with ``# noqa``. Read more about this
91 To silence violations reported by mccabe, place your ``# noqa: C901`` on
92 the function definition line, where the error is reported for (possibly a
98 * Feedback and ideas: http://mail.python.org/mailman/listinfo/code-quality
100 * Cyclomatic complexity: http://en.wikipedia.org/wiki/Cyclomatic_complexity
102 * Ned Batchelder's script:
104 http://nedbatchelder.com/blog/200803/python_code_complexity_microtool.html
106 * McCabe complexity: http://en.wikipedia.org/wiki/Cyclomatic_complexity
114 * Drop support for all versions of Python lower than 3.6
116 * Add support for Python 3.8, 3.9, and 3.10
118 * Fix option declaration for Flake8
123 * Fix signature for ``PathGraphingAstVisitor.default to match the signature
129 * Add support for Python 3.6
131 * Fix handling for missing statement types
136 6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e 7350 mccabe-0.7.0-py2.py3-none-any.whl