File tree Expand file tree Collapse file tree 3 files changed +49
-4
lines changed
Expand file tree Collapse file tree 3 files changed +49
-4
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ repos:
3737 rev : 25.1.0
3838 hooks :
3939 - id : black
40+ - repo : https://github.com/tonybaloney/perflint
41+ rev : 0.8.1
42+ hooks :
43+ - id : perflint
4044 - repo : https://github.com/adamchainz/blacken-docs
4145 rev : " 1.19.1"
4246 hooks :
Original file line number Diff line number Diff line change @@ -66,8 +66,8 @@ Performance-Messungen
6666---------------------
6767
6868Wenn ihr erst einmal mit eurem Code gearbeitet habt, kann es nützlich sein, die
69- Effizienz genauer zu untersuchen. Hierfür kann der :doc: ` ipython-profiler ` oder
70- :doc: `scalene ` genutzt werden.
69+ Effizienz genauer zu untersuchen. Hierfür kann :mod: ` cProfile `,
70+ :doc: `ipython-profiler ` oder :doc: ` scalene ` genutzt werden.
7171
7272.. seealso ::
7373 * `airspeed velocity (asv) <https://asv.readthedocs.io/en/stable/ >`_ ist ein
Original file line number Diff line number Diff line change @@ -6,8 +6,49 @@ perflint
66========
77
88`perflint <https://github.com/tonybaloney/perflint >`_ ist eine Erweiterung für
9- `pylint <https://pylint.org/ >`_ für Performance-Anti-Patterns, :abbr: `u.a.
10- ( unter anderem ) `:
9+ `pylint <https://pylint.org/ >`_ für Performance-Anti-Patternsr.
10+
11+ Installation
12+ ------------
13+
14+ .. code-block :: console
15+
16+ $ uv add --dev perflint
17+
18+ Verwendung
19+ ----------
20+
21+ … als eigenständiger Linter
22+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
23+
24+ .. code-block :: console
25+
26+ $ uv run perflint src/
27+
28+ … als ``pylint ``-Plugin
29+ ~~~~~~~~~~~~~~~~~~~~~~~
30+
31+ .. code-block :: console
32+
33+ $ uv run perflint src/ --load-plugins=perflint
34+
35+ … als pre-commit-Hook
36+ ~~~~~~~~~~~~~~~~~~~~~
37+
38+ perflint kann auch mit dem :doc: `/productive/git/advanced/hooks/pre-commit `
39+ verwendet werden:
40+
41+ .. code-block :: yaml
42+ :caption : .pre-commit-config.yaml
43+
44+ repos :
45+ - repo : https://github.com/tonybaloney/perflint
46+ rev : 0.8.1
47+ hooks :
48+ - id : perflint
49+
50+ Regeln
51+ ------
1152
1253W8101: ``unnecessary-list-cast ``
1354 Unnötige Verwendung von ``list() `` bei einem bereits iterierbarem Typ.
You can’t perform that action at this time.
0 commit comments