@@ -12,6 +12,8 @@ disable=
1212 C0114, # missing-module-docstring
1313 C0115, # missing-class-docstring
1414 C0116, # missing-function-docstring
15+ C0411, # wrong-import-order (instead of old E0411)
16+ C0413, # wrong-import-position (instead of old E0413)
1517 R0902, # too-many-instance-attributes (common in product models)
1618 R0913, # too-many-arguments (pricers/calibrators often need them)
1719 R0914, # too-many-locals (numerical routines)
@@ -20,10 +22,7 @@ disable=
2022 W0511, # fixme (we allow TODO notes, use pre-commit to gate later)
2123 W1203, # logging-fstring-interpolation (we prefer f-strings)
2224 E1136, # unsubscriptable-object (often false-positive with numpy)
23- # E1101, # no-member (NumPy/Numba dynamic attrs)
2425 E0401, # unable to import
25- E0411, # unable to import in some order
26- E0413, # unable to import in some order
2726
2827enable =
2928 unused-import,
@@ -43,15 +42,27 @@ max-module-lines=4000
4342indent-string =' '
4443
4544[BASIC]
46- good-names =i,j,k,m,n,t,x,y,z,dt,df,pv,dv01,ir,fx,np,va,vc,mu,sigma,qr
45+ good-names =
46+ i, j, k, n, m, t, x, y, z, r, q, p,
47+ df, pv, fv, fx, npv, irr,
48+ dt, dr, dv, dx,
49+ mu, sigma, lam, va, vc, dv01
50+ X, Y, Z,
51+ s, S, K,
52+ u, v, w,
53+ __version__
54+
4755bad-names =foo,bar,baz
48- variable-rgx =^[a-z_][a-z0-9_]*$
49- argument-rgx =^[a-z_][a-z0-9_]*$
50- attr-rgx =^[a-z_][a-z0-9_]*$
51- method-rgx =^(test_.+|[a-z_][a-z0-9_]*)$
52- function-rgx =^(test_.+|[a-z_][a-z0-9_]*)$
53- class-rgx =^[A-Z][a-zA-Z0-9]+$
54- const-rgx =^(_?[A-Z][A-Z0-9_]*|k[A-Z][A-Za-z0-9]+)$
56+
57+ # Regexes for naming style checks (keep defaults except constants)
58+ argument-rgx =[a-z_][a-z0-9_]{0,30}$
59+ attr-rgx =[a-z_][a-z0-9_]{0,30}$
60+ class-rgx =[A-Z_][a-zA-Z0-9]+$
61+ const-rgx =^(_?[A-Z][A-Z0-9_]*|__version__)$
62+ function-rgx =[a-z_][a-z0-9_]{2,30}$
63+ method-rgx =[a-z_][a-z0-9_]{2,30}$
64+ module-rgx =(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
65+ variable-rgx =[a-z_][a-z0-9_]{0,30}$
5566
5667[TYPECHECK]
5768generated-members =numpy.*,np.*,pandas.*,pd.*
0 commit comments