File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -86,12 +86,10 @@ def func_std_string(self): # match what old profile produced
86
86
)
87
87
88
88
def subfuncs (self ):
89
- i = 0
90
89
h , s , v = self .hsv
91
90
count = len (self .statobj .all_callees [self .func ])
92
- for func , stats in self .statobj .all_callees [self .func ].items ():
93
- i += 1
94
- h1 = h + (i / count ) / (self .depth + 1 )
91
+ for i , (func , stats ) in enumerate (self .statobj .all_callees [self .func ].items ()):
92
+ h1 = h + ((i + 1 ) / count ) / (self .depth + 1 )
95
93
s1 = 0 if stats [3 ] == 0 else s * (stats [3 ] / self .stats [3 ])
96
94
yield FunctionCall (
97
95
self .statobj ,
Original file line number Diff line number Diff line change @@ -51,6 +51,11 @@ packages = ["debug_toolbar"]
51
51
path = " debug_toolbar/__init__.py"
52
52
53
53
[tool .ruff ]
54
+ fix = true
55
+ show-fixes = true
56
+ target-version = " py38"
57
+
58
+ [tool .ruff .lint ]
54
59
extend-select = [
55
60
" ASYNC" , # flake8-async
56
61
" B" , # flake8-bugbear
@@ -75,17 +80,14 @@ extend-ignore = [
75
80
" E501" , # Ignore line length violations
76
81
" SIM108" , # Use ternary operator instead of if-else-block
77
82
]
78
- fix = true
79
- show-fixes = true
80
- target-version = " py38"
81
83
82
- [tool .ruff .isort ]
84
+ [tool .ruff .lint . isort ]
83
85
combine-as-imports = true
84
86
85
- [tool .ruff .mccabe ]
87
+ [tool .ruff .lint . mccabe ]
86
88
max-complexity = 16
87
89
88
- [tool .ruff .per-file-ignores ]
90
+ [tool .ruff .lint . per-file-ignores ]
89
91
"*/migrat*/*" = [
90
92
" N806" , # Allow using PascalCase model names in migrations
91
93
" N999" , # Ignore the fact that migration files are invalid module names
You can’t perform that action at this time.
0 commit comments