]> crepu.dev Git - config.git/blame_incremental - djavu-asus/elpy/rpc-venv/lib/python3.11/site-packages/mccabe-0.7.0.dist-info/METADATA
Archivo de configuraciĆ³n de la terminal
[config.git] / djavu-asus / elpy / rpc-venv / lib / python3.11 / site-packages / mccabe-0.7.0.dist-info / METADATA
... / ...
CommitLineData
1Metadata-Version: 2.1
2Name: mccabe
3Version: 0.7.0
4Summary: McCabe checker, plugin for flake8
5Home-page: https://github.com/pycqa/mccabe
6Author: Tarek Ziade
7Author-email: tarek@ziade.org
8Maintainer: Ian Stapleton Cordasco
9Maintainer-email: graffatcolmingov@gmail.com
10License: Expat license
11Keywords: flake8 mccabe
12Platform: UNKNOWN
13Classifier: Development Status :: 5 - Production/Stable
14Classifier: Environment :: Console
15Classifier: Intended Audience :: Developers
16Classifier: License :: OSI Approved :: MIT License
17Classifier: Operating System :: OS Independent
18Classifier: Programming Language :: Python
19Classifier: Programming Language :: Python :: 3.6
20Classifier: Programming Language :: Python :: 3.7
21Classifier: Programming Language :: Python :: 3.8
22Classifier: Programming Language :: Python :: 3.9
23Classifier: Programming Language :: Python :: 3.10
24Classifier: Topic :: Software Development :: Libraries :: Python Modules
25Classifier: Topic :: Software Development :: Quality Assurance
26Requires-Python: >=3.6
27License-File: LICENSE
28
29McCabe complexity checker
30=========================
31
32Ned's script to check McCabe complexity.
33
34This module provides a plugin for ``flake8``, the Python code checker.
35
36
37Installation
38------------
39
40You can install, upgrade, or uninstall ``mccabe`` with these commands::
41
42 $ pip install mccabe
43 $ pip install --upgrade mccabe
44 $ pip uninstall mccabe
45
46
47Standalone script
48-----------------
49
50The complexity checker can be used directly::
51
52 $ python -m mccabe --min 5 mccabe.py
53 ("185:1: 'PathGraphingAstVisitor.visitIf'", 5)
54 ("71:1: 'PathGraph.to_dot'", 5)
55 ("245:1: 'McCabeChecker.run'", 5)
56 ("283:1: 'main'", 7)
57 ("203:1: 'PathGraphingAstVisitor.visitTryExcept'", 5)
58 ("257:1: 'get_code_complexity'", 5)
59
60
61Plugin for Flake8
62-----------------
63
64When both ``flake8 2+`` and ``mccabe`` are installed, the plugin is
65available in ``flake8``::
66
67 $ flake8 --version
68 2.0 (pep8: 1.4.2, pyflakes: 0.6.1, mccabe: 0.2)
69
70By default the plugin is disabled. Use the ``--max-complexity`` switch to
71enable it. It will emit a warning if the McCabe complexity of a function is
72higher than the provided value::
73
74 $ flake8 --max-complexity 10 coolproject
75 ...
76 coolproject/mod.py:1204:1: C901 'CoolFactory.prepare' is too complex (14)
77
78This feature is quite useful for detecting over-complex code. According to McCabe,
79anything that goes beyond 10 is too complex.
80
81Flake8 has many features that mccabe does not provide. Flake8 allows users to
82ignore violations reported by plugins with ``# noqa``. Read more about this in
83`their documentation
84<http://flake8.pycqa.org/en/latest/user/violations.html#in-line-ignoring-errors>`__.
85To silence violations reported by ``mccabe``, place your ``# noqa: C901`` on
86the function definition line, where the error is reported for (possibly a
87decorator).
88
89
90Links
91-----
92
93* Feedback and ideas: http://mail.python.org/mailman/listinfo/code-quality
94
95* Cyclomatic complexity: http://en.wikipedia.org/wiki/Cyclomatic_complexity
96
97* Ned Batchelder's script:
98 http://nedbatchelder.com/blog/200803/python_code_complexity_microtool.html
99
100* McCabe complexity: http://en.wikipedia.org/wiki/Cyclomatic_complexity
101
102
103Changes
104-------
105
1060.7.0 - 2021-01-23
107``````````````````
108
109* Drop support for all versions of Python lower than 3.6
110
111* Add support for Python 3.8, 3.9, and 3.10
112
113* Fix option declaration for Flake8
114
1150.6.1 - 2017-01-26
116``````````````````
117
118* Fix signature for ``PathGraphingAstVisitor.default`` to match the signature
119 for ``ASTVisitor``
120
1210.6.0 - 2017-01-23
122``````````````````
123
124* Add support for Python 3.6
125
126* Fix handling for missing statement types
127
1280.5.3 - 2016-12-14
129``````````````````
130
131* Report actual column number of violation instead of the start of the line
132
1330.5.2 - 2016-07-31
134``````````````````
135
136* When opening files ourselves, make sure we always name the file variable
137
1380.5.1 - 2016-07-28
139``````````````````
140
141* Set default maximum complexity to -1 on the class itself
142
1430.5.0 - 2016-05-30
144``````````````````
145
146* PyCon 2016 PDX release
147
148* Add support for Flake8 3.0
149
1500.4.0 - 2016-01-27
151``````````````````
152
153* Stop testing on Python 3.2
154
155* Add support for async/await keywords on Python 3.5 from PEP 0492
156
1570.3.1 - 2015-06-14
158``````````````````
159
160* Include ``test_mccabe.py`` in releases.
161
162* Always coerce the ``max_complexity`` value from Flake8's entry-point to an
163 integer.
164
1650.3 - 2014-12-17
166````````````````
167
168* Computation was wrong: the mccabe complexity starts at 1, not 2.
169
170* The ``max-complexity`` value is now inclusive. E.g.: if the
171 value is 10 and the reported complexity is 10, then it passes.
172
173* Add tests.
174
175
1760.2.1 - 2013-04-03
177``````````````````
178
179* Do not require ``setuptools`` in setup.py. It works around an issue
180 with ``pip`` and Python 3.
181
182
1830.2 - 2013-02-22
184````````````````
185
186* Rename project to ``mccabe``.
187
188* Provide ``flake8.extension`` setuptools entry point.
189
190* Read ``max-complexity`` from the configuration file.
191
192* Rename argument ``min_complexity`` to ``threshold``.
193
194
1950.1 - 2013-02-11
196````````````````
197* First release
198
199