File tree Expand file tree Collapse file tree 3 files changed +57
-2
lines changed
doc/data/messages/t/too-many-ancestors Expand file tree Collapse file tree 3 files changed +57
-2
lines changed Original file line number Diff line number Diff line change
1
+ class Animal : ...
2
+ class BeakyAnimal (Animal ): ...
3
+ class FurryAnimal (Animal ): ...
4
+ class Swimmer (Animal ): ...
5
+ class EggLayer (Animal ): ...
6
+ class VenomousAnimal (Animal ): ...
7
+ class ProtectedSpecie (Animal ): ...
8
+ class BeaverTailedAnimal (Animal ): ...
9
+ class Vertebrate (Animal ): ...
10
+
11
+
12
+ # max of 7 by default, can be configured
13
+ # each edge of a diamond inheritance counts
14
+ class Playtypus ( # [too-many-ancestors]
15
+ BeakyAnimal ,
16
+ FurryAnimal ,
17
+ Swimmer ,
18
+ EggLayer ,
19
+ VenomousAnimal ,
20
+ ProtectedSpecie ,
21
+ BeaverTailedAnimal ,
22
+ Vertebrate ,
23
+ ):
24
+ pass
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- # This is a placeholder for correct code for this message.
1
+ class Animal :
2
+ beaver_tailed : bool
3
+ can_swim : bool
4
+ has_beak : bool
5
+ has_fur : bool
6
+ has_vertebrae : bool
7
+ lays_egg : bool
8
+ protected_specie : bool
9
+ venomous : bool
10
+
11
+
12
+ class Invertebrate (Animal ):
13
+ has_vertebrae = False
14
+
15
+
16
+ class Vertebrate (Animal ):
17
+ has_vertebrae = True
18
+
19
+
20
+ class Mammal (Vertebrate ):
21
+ has_beak = False
22
+ has_fur = True
23
+ lays_egg = False
24
+ venomous = False
25
+
26
+
27
+ class Playtypus (Mammal ):
28
+ beaver_tailed = True
29
+ can_swim = True
30
+ has_beak = True
31
+ lays_egg = False
32
+ protected_specie = True
33
+ venomous = True
You can’t perform that action at this time.
0 commit comments