@@ -28,7 +28,7 @@ class Blocker(IntEnum):
2828 Weak = C.BLOCKER_WEAK
2929
3030 @staticmethod
31- def from_str (str s not None ):
31+ def from_str (s: str ):
3232 blocker = C.pkgcraft_dep_blocker_from_str(s.encode())
3333 if blocker > 0 :
3434 return Blocker(blocker)
@@ -49,7 +49,7 @@ class SlotOperator(IntEnum):
4949 Star = C.SLOT_OPERATOR_STAR
5050
5151 @staticmethod
52- def from_str (str s not None ):
52+ def from_str (s: str ):
5353 slot_op = C.pkgcraft_dep_slot_op_from_str(s.encode())
5454 if slot_op > 0 :
5555 return SlotOperator(slot_op)
@@ -113,7 +113,7 @@ cdef class Dep:
113113 self ._use_deps = SENTINEL
114114 self .eapi = EAPI_LATEST
115115
116- def __init__ (self , str s not None , /, eapi = None ):
116+ def __init__ (self , s: str , /, eapi = None ):
117117 if eapi is not None :
118118 self .eapi = Eapi._from_obj(eapi)
119119
@@ -129,12 +129,12 @@ cdef class Dep:
129129 return obj
130130
131131 @classmethod
132- def cached (cls , str s not None , eapi = None ):
132+ def cached (cls , s: str , eapi = None ):
133133 """ Return a cached Dep if one exists, otherwise return a new instance."""
134134 return _cached_dep(cls , s, eapi)
135135
136136 @staticmethod
137- def valid (str s not None , eapi = None , raised = False ):
137+ def valid (s: str , eapi = None , raised = False ):
138138 """ Determine if a string is a valid package dependency.
139139
140140 >>> from pkgcraft.dep import Dep
@@ -477,7 +477,7 @@ cdef class Dep:
477477 """
478478 return cstring_to_str(C.pkgcraft_dep_cpv(self .ptr))
479479
480- def matches (self , Restrict r not None ):
480+ def matches (self , r: Restrict ):
481481 """ Determine if a restriction matches a package dependency."""
482482 return C.pkgcraft_dep_restrict_matches(self .ptr, r.ptr)
483483
@@ -550,7 +550,7 @@ cdef class Dep:
550550cdef class Cpn(Dep):
551551 """ Unversioned Package dependency."""
552552
553- def __init__ (self , str s not None ):
553+ def __init__ (self , s: str ):
554554 self .ptr = C.pkgcraft_dep_new_cpn(s.encode())
555555 if self .ptr is NULL :
556556 raise InvalidDep
0 commit comments