@@ -39,12 +39,9 @@ def not_specification(self):
3939
4040
4141class AndSpecification (CompositeSpecification ):
42- _one = Specification ()
43- _other = Specification ()
44-
4542 def __init__ (self , one , other ):
46- self ._one = one
47- self ._other = other
43+ self ._one : Specification = one
44+ self ._other : Specification = other
4845
4946 def is_satisfied_by (self , candidate ):
5047 return bool (
@@ -54,12 +51,9 @@ def is_satisfied_by(self, candidate):
5451
5552
5653class OrSpecification (CompositeSpecification ):
57- _one = Specification ()
58- _other = Specification ()
59-
6054 def __init__ (self , one , other ):
61- self ._one = one
62- self ._other = other
55+ self ._one : Specification = one
56+ self ._other : Specification = other
6357
6458 def is_satisfied_by (self , candidate ):
6559 return bool (
@@ -69,10 +63,8 @@ def is_satisfied_by(self, candidate):
6963
7064
7165class NotSpecification (CompositeSpecification ):
72- _wrapped = Specification ()
73-
7466 def __init__ (self , wrapped ):
75- self ._wrapped = wrapped
67+ self ._wrapped : Specification = wrapped
7668
7769 def is_satisfied_by (self , candidate ):
7870 return bool (not self ._wrapped .is_satisfied_by (candidate ))
0 commit comments