summaryrefslogtreecommitdiff
path: root/pylint/checkers/classes.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/checkers/classes.py')
-rw-r--r--pylint/checkers/classes.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pylint/checkers/classes.py b/pylint/checkers/classes.py
index 0b15861b0..2ab66fd0b 100644
--- a/pylint/checkers/classes.py
+++ b/pylint/checkers/classes.py
@@ -808,6 +808,9 @@ a metaclass class method.",
self._first_attrs = []
self._meth_could_be_func = None
+ def open(self) -> None:
+ self._mixin_class_rgx = get_global_option(self, "mixin-class-rgx")
+
@astroid.decorators.cachedproperty
def _dummy_rgx(self):
return get_global_option(self, "dummy-variables-rgx", default=None)
@@ -1029,7 +1032,7 @@ a metaclass class method.",
def _check_attribute_defined_outside_init(self, cnode: nodes.ClassDef) -> None:
# check access to existent members on non metaclass classes
- if self._ignore_mixin and cnode.name[-5:].lower() == "mixin":
+ if self._ignore_mixin and self._mixin_class_rgx.match(cnode.name):
# We are in a mixin class. No need to try to figure out if
# something is missing, since it is most likely that it will
# miss.