Ravenports generated: 11 Dec 2022 20:15
[ravenports.git] / bucket_E2 / python-mccabe
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-mccabe
4 VERSION=                0.7.0
5 KEYWORDS=               python
6 VARIANTS=               py310 py311
7 SDESC[py310]=           McCabe checker, plugin for flake8 (3.10)
8 SDESC[py311]=           McCabe checker, plugin for flake8 (3.11)
9 HOMEPAGE=               https://github.com/pycqa/mccabe
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPIWHL/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9
14 DISTFILE[1]=            mccabe-0.7.0-py2.py3-none-any.whl:main
15 DF_INDEX=               1
16 SPKGS[py310]=           single
17 SPKGS[py311]=           single
18
19 OPTIONS_AVAILABLE=      PY310 PY311
20 OPTIONS_STANDARD=       none
21 VOPTS[py310]=           PY310=ON PY311=OFF
22 VOPTS[py311]=           PY310=OFF PY311=ON
23
24 DISTNAME=               mccabe-0.7.0.dist-info
25
26 GENERATED=              yes
27
28 [PY310].USES_ON=                        python:py310,wheel
29
30 [PY311].USES_ON=                        python:py311,wheel
31
32 [FILE:2426:descriptions/desc.single]
33 McCabe complexity checker
34 =========================
35
36 Ned's script to check McCabe complexity.
37
38 This module provides a plugin for flake8, the Python code checker.
39
40 Installation
41 ------------
42
43 You can install, upgrade, or uninstall mccabe with these commands::
44
45   $ pip install mccabe
46   $ pip install --upgrade mccabe
47   $ pip uninstall mccabe
48
49 Standalone script
50 -----------------
51
52 The complexity checker can be used directly::
53
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)
58   ("283:1: 'main'", 7)
59   ("203:1: 'PathGraphingAstVisitor.visitTryExcept'", 5)
60   ("257:1: 'get_code_complexity'", 5)
61
62 Plugin for Flake8
63 -----------------
64
65 When both ``flake8 2+ and mccabe`` are installed, the plugin is
66 available in flake8::
67
68   $ flake8 --version
69   2.0 (pep8: 1.4.2, pyflakes: 0.6.1, mccabe: 0.2)
70
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
73 is
74 higher than the provided value::
75
76     $ flake8 --max-complexity 10 coolproject
77     ...
78     coolproject/mod.py:1204:1: C901 'CoolFactory.prepare' is too complex
79 (14)
80
81 This feature is quite useful for detecting over-complex code.  According to
82 McCabe,
83 anything that goes beyond 10 is too complex.
84
85 Flake8 has many features that mccabe does not provide. Flake8 allows users
86 to
87 ignore violations reported by plugins with ``# noqa``. Read more about this
88 in
89 [their documentation
90 ].
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
93 decorator).
94
95 Links
96 -----
97
98 * Feedback and ideas: http://mail.python.org/mailman/listinfo/code-quality
99
100 * Cyclomatic complexity: http://en.wikipedia.org/wiki/Cyclomatic_complexity
101
102 * Ned Batchelder's script:
103  
104 http://nedbatchelder.com/blog/200803/python_code_complexity_microtool.html
105
106 * McCabe complexity: http://en.wikipedia.org/wiki/Cyclomatic_complexity
107
108 Changes
109 -------
110
111 0.7.0 - 2021-01-23
112 ``
113
114 * Drop support for all versions of Python lower than 3.6
115
116 * Add support for Python 3.8, 3.9, and 3.10
117
118 * Fix option declaration for Flake8
119
120 0.6.1 - 2017-01-26
121 ``
122
123 * Fix signature for ``PathGraphingAstVisitor.default to match the signature
124   for ASTVisitor``
125
126 0.6.0 - 2017-01-23
127 ``
128
129 * Add support for Python 3.6
130
131 * Fix handling for missing statement types
132
133
134
135 [FILE:112:distinfo]
136 6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e         7350 mccabe-0.7.0-py2.py3-none-any.whl
137