mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-26 01:27:24 +01:00
Enable N806: rename half_N to half_n
This commit is contained in:
parent
d0eb820c87
commit
63a9873343
@ -10,7 +10,7 @@ def calculate_symmetric_weights(N, middle_weight, factors=None):
|
|||||||
`split_x_into_n_symmetrically` function).
|
`split_x_into_n_symmetrically` function).
|
||||||
Must have length N // 2 or N // 2 - 1 depending on N.
|
Must have length N // 2 or N // 2 - 1 depending on N.
|
||||||
"""
|
"""
|
||||||
half_N = N // 2
|
half_n = N // 2
|
||||||
weights_left = [middle_weight]
|
weights_left = [middle_weight]
|
||||||
|
|
||||||
if factors:
|
if factors:
|
||||||
@ -18,7 +18,7 @@ def calculate_symmetric_weights(N, middle_weight, factors=None):
|
|||||||
next_weight = weights_left[-1] + factor
|
next_weight = weights_left[-1] + factor
|
||||||
weights_left.append(next_weight)
|
weights_left.append(next_weight)
|
||||||
else:
|
else:
|
||||||
for i in range(half_N - 1):
|
for i in range(half_n - 1):
|
||||||
weights_left.append(middle_weight - (i + 1))
|
weights_left.append(middle_weight - (i + 1))
|
||||||
|
|
||||||
if N % 2 == 0:
|
if N % 2 == 0:
|
||||||
|
|||||||
@ -56,7 +56,6 @@ ignore = [
|
|||||||
"ARG001", # Unused function argument - often needed for API compatibility
|
"ARG001", # Unused function argument - often needed for API compatibility
|
||||||
"ARG002", # Unused method argument - often needed for API compatibility
|
"ARG002", # Unused method argument - often needed for API compatibility
|
||||||
"N816", # mixed-case-variable-in-global-scope - often constants
|
"N816", # mixed-case-variable-in-global-scope - often constants
|
||||||
"N806", # non-lowercase-variable - sometimes intentional
|
|
||||||
"N803", # invalid-argument-name - chess notation uses uppercase
|
"N803", # invalid-argument-name - chess notation uses uppercase
|
||||||
"N999", # invalid-module-name - PYTHON folder name
|
"N999", # invalid-module-name - PYTHON folder name
|
||||||
"LOG015", # root-logger-call - common in scripts
|
"LOG015", # root-logger-call - common in scripts
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user