1010
1111
1212# ------------------------------
13- # CONSTANTS
13+ # PRIVATE METHODS
1414# ------------------------------
1515
1616def _get_project_root () -> Path :
@@ -204,7 +204,7 @@ class APIOperation:
204204 # CONSTRUCTOR
205205 # ------------------------------
206206
207- def __init__ (self , name : str , displayName : str , urlTemplate : str , method : HTTP_VERB , description : str , policyXml : Optional [str ] = None , templateParameters : Optional [List [dict [str , Any ]]] = None ):
207+ def __init__ (self , name : str , displayName : str , urlTemplate : str , method : HTTP_VERB , description : str , policyXml : Optional [str ] = None , templateParameters : Optional [List [dict [str , Any ]]] = None ) -> None :
208208 # Validate that method is a valid HTTP_VERB
209209 if not isinstance (method , HTTP_VERB ):
210210 try :
@@ -241,6 +241,7 @@ class GET_APIOperation(APIOperation):
241241 """
242242 Represents a simple GET operation within a parent API.
243243 """
244+
244245 # ------------------------------
245246 # CONSTRUCTOR
246247 # ------------------------------
@@ -254,11 +255,12 @@ class GET_APIOperation2(APIOperation):
254255 """
255256 Represents a GET operation within a parent API.
256257 """
258+
257259 # ------------------------------
258260 # CONSTRUCTOR
259261 # ------------------------------
260262
261- def __init__ (self , name : str , displayName : str , urlTemplate : str , description : str , policyXml : Optional [str ] = None , templateParameters : Optional [List [dict [str , Any ]]] = None ):
263+ def __init__ (self , name : str , displayName : str , urlTemplate : str , description : str , policyXml : Optional [str ] = None , templateParameters : Optional [List [dict [str , Any ]]] = None ) -> None :
262264 super ().__init__ (name , displayName , urlTemplate , HTTP_VERB .GET , description , policyXml , templateParameters )
263265
264266
@@ -267,11 +269,12 @@ class POST_APIOperation(APIOperation):
267269 """
268270 Represents a simple POST operation within a parent API.
269271 """
272+
270273 # ------------------------------
271274 # CONSTRUCTOR
272275 # ------------------------------
273276
274- def __init__ (self , description : str , policyXml : Optional [str ] = None , templateParameters : Optional [List [dict [str , Any ]]] = None ):
277+ def __init__ (self , description : str , policyXml : Optional [str ] = None , templateParameters : Optional [List [dict [str , Any ]]] = None ) -> None :
275278 super ().__init__ ('POST' , 'POST' , '/' , HTTP_VERB .POST , description , policyXml , templateParameters )
276279
277280
@@ -289,7 +292,7 @@ class NamedValue:
289292 # CONSTRUCTOR
290293 # ------------------------------
291294
292- def __init__ (self , name : str , value : str , isSecret : bool = False ):
295+ def __init__ (self , name : str , value : str , isSecret : bool = False ) -> None :
293296 self .name = name
294297 self .value = value
295298 self .isSecret = isSecret
@@ -307,6 +310,7 @@ def to_dict(self) -> dict:
307310 }
308311
309312 return nv_dict
313+
310314
311315@dataclass
312316class PolicyFragment :
@@ -322,7 +326,7 @@ class PolicyFragment:
322326 # CONSTRUCTOR
323327 # ------------------------------
324328
325- def __init__ (self , name : str , policyXml : str , description : str = '' ):
329+ def __init__ (self , name : str , policyXml : str , description : str = '' ) -> None :
326330 self .name = name
327331 self .policyXml = policyXml
328332 self .description = description
@@ -362,7 +366,7 @@ class Product:
362366 # CONSTRUCTOR
363367 # ------------------------------
364368
365- def __init__ (self , name : str , displayName : str , description : str , state : str = 'published' , subscriptionRequired : bool = True , approvalRequired : bool = False , policyXml : Optional [str ] = None ):
369+ def __init__ (self , name : str , displayName : str , description : str , state : str = 'published' , subscriptionRequired : bool = True , approvalRequired : bool = False , policyXml : Optional [str ] = None ) -> None :
366370 self .name = name
367371 self .displayName = displayName
368372 self .description = description
@@ -391,6 +395,7 @@ def __init__(self, name: str, displayName: str, description: str, state: str = '
391395</policies>"""
392396 else :
393397 self .policyXml = policyXml
398+
394399 # ------------------------------
395400 # PUBLIC METHODS
396401 # ------------------------------
@@ -408,4 +413,4 @@ def to_dict(self) -> dict:
408413 if self .policyXml is not None :
409414 product_dict ["policyXml" ] = self .policyXml
410415
411- return product_dict
416+ return product_dict
0 commit comments