blob: 27e8d08a1ce81273da6e535d887ff08ddd064ff6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
"""Regression test for a crash reported in https://github.com/pylint-dev/pylint/issues/4982"""
# pylint: disable=too-few-public-methods
class Base:
"""A class"""
@classmethod
def get_first_subclass(cls):
"""Return the first subclass of this class"""
for subklass in cls.__subclasses__():
return subklass
return object
subclass = Base.get_first_subclass()
class Another(subclass):
"""Create a class from the __subclasses__ attribute of another class"""
|