[Mod] 消除pylint对Enum的抱怨
This commit is contained in:
parent
726089b2d8
commit
74de2f77b5
16
.pylintrc
16
.pylintrc
@ -121,9 +121,10 @@ never-returning-functions=sys.exit
|
|||||||
|
|
||||||
# Regular expression matching correct argument names. Overrides argument-
|
# Regular expression matching correct argument names. Overrides argument-
|
||||||
# naming-style.
|
# naming-style.
|
||||||
argument-rgx=^[a-z][a-z0-9_]*$
|
argument-rgx=^[_a-z][a-z0-9_]*$
|
||||||
|
|
||||||
# Naming style matching correct attribute names.
|
# Naming style matching correct attribute names.
|
||||||
|
# self.xxxx
|
||||||
attr-naming-style=snake_case
|
attr-naming-style=snake_case
|
||||||
|
|
||||||
# Regular expression matching correct attribute names. Overrides attr-naming-
|
# Regular expression matching correct attribute names. Overrides attr-naming-
|
||||||
@ -139,11 +140,13 @@ bad-names=foo,
|
|||||||
tata
|
tata
|
||||||
|
|
||||||
# Naming style matching correct class attribute names.
|
# Naming style matching correct class attribute names.
|
||||||
class-attribute-naming-style=snake_case
|
#class-attribute-naming-style=
|
||||||
|
|
||||||
# Regular expression matching correct class attribute names. Overrides class-
|
# Regular expression matching correct class attribute names. Overrides class-
|
||||||
# attribute-naming-style.
|
# attribute-naming-style.
|
||||||
#class-attribute-rgx=
|
# ClassA.XXXX
|
||||||
|
# except that dataclass should be snake_case
|
||||||
|
class-attribute-rgx=^([A-Z][A-Z_]+|[_a-z][a-z0-9_]+)$
|
||||||
|
|
||||||
# Naming style matching correct class names.
|
# Naming style matching correct class names.
|
||||||
class-naming-style=PascalCase
|
class-naming-style=PascalCase
|
||||||
@ -157,7 +160,8 @@ class-naming-style=PascalCase
|
|||||||
|
|
||||||
# Regular expression matching correct constant names. Overrides const-naming-
|
# Regular expression matching correct constant names. Overrides const-naming-
|
||||||
# style.
|
# style.
|
||||||
const-rgx=(([A-Z_][A-Za-z0-9_]*)|(__.*__))$
|
const-rgx=^([A-Z][A-Z0-9_]+|[a-z][a-z0-9_]+|__\w+__)$
|
||||||
|
|
||||||
|
|
||||||
# Minimum line length for functions/classes that require docstrings, shorter
|
# Minimum line length for functions/classes that require docstrings, shorter
|
||||||
# ones are exempt.
|
# ones are exempt.
|
||||||
@ -182,11 +186,11 @@ good-names=i,
|
|||||||
include-naming-hint=yes
|
include-naming-hint=yes
|
||||||
|
|
||||||
# Naming style matching correct inline iteration names.
|
# Naming style matching correct inline iteration names.
|
||||||
inlinevar-naming-style=any
|
#inlinevar-naming-style=any
|
||||||
|
|
||||||
# Regular expression matching correct inline iteration names. Overrides
|
# Regular expression matching correct inline iteration names. Overrides
|
||||||
# inlinevar-naming-style.
|
# inlinevar-naming-style.
|
||||||
#inlinevar-rgx=
|
inlinevar-rgx=^[a-z][a-z0-9_]*$
|
||||||
|
|
||||||
# Naming style matching correct method names.
|
# Naming style matching correct method names.
|
||||||
method-naming-style=snake_case
|
method-naming-style=snake_case
|
||||||
|
Loading…
Reference in New Issue
Block a user