@@ -299,35 +299,35 @@ def _imported_module(
299
299
mod_paths .append (mod_path )
300
300
301
301
302
- class AssociationHandlerInterface (ABC ):
302
+ class RelationshipHandlerInterface (ABC ):
303
303
@abstractmethod
304
304
def set_next (
305
- self , handler : AssociationHandlerInterface
306
- ) -> AssociationHandlerInterface :
305
+ self , handler : RelationshipHandlerInterface
306
+ ) -> RelationshipHandlerInterface :
307
307
pass
308
308
309
309
@abstractmethod
310
310
def handle (self , node : nodes .AssignAttr , parent : nodes .ClassDef ) -> None :
311
311
pass
312
312
313
313
314
- class AbstractAssociationHandler ( AssociationHandlerInterface ):
314
+ class AbstractRelationshipHandler ( RelationshipHandlerInterface ):
315
315
"""
316
- Chain of Responsibility for handling types of association , useful
317
- to expand in the future if we want to add more distinct associations .
316
+ Chain of Responsibility for handling types of relationships , useful
317
+ to expand in the future if we want to add more distinct relationships .
318
318
319
- Every link of the chain checks if it's a certain type of association .
320
- If no association is found it's set as a generic association in `associations_type `.
319
+ Every link of the chain checks if it's a certain type of relationship .
320
+ If no relationship is found it's set as a generic relationship in `relationships_type `.
321
321
322
322
The default chaining behavior is implemented inside the base handler
323
323
class.
324
324
"""
325
325
326
- _next_handler : AssociationHandlerInterface
326
+ _next_handler : RelationshipHandlerInterface
327
327
328
328
def set_next (
329
- self , handler : AssociationHandlerInterface
330
- ) -> AssociationHandlerInterface :
329
+ self , handler : RelationshipHandlerInterface
330
+ ) -> RelationshipHandlerInterface :
331
331
self ._next_handler = handler
332
332
return handler
333
333
@@ -337,7 +337,7 @@ def handle(self, node: nodes.AssignAttr, parent: nodes.ClassDef) -> None:
337
337
self ._next_handler .handle (node , parent )
338
338
339
339
340
- class CompositionsHandler (AbstractAssociationHandler ):
340
+ class CompositionsHandler (AbstractRelationshipHandler ):
341
341
"""Handle composition relationships where parent creates child objects."""
342
342
343
343
def handle (self , node : nodes .AssignAttr , parent : nodes .ClassDef ) -> None :
@@ -384,7 +384,7 @@ def handle(self, node: nodes.AssignAttr, parent: nodes.ClassDef) -> None:
384
384
super ().handle (node , parent )
385
385
386
386
387
- class AggregationsHandler (AbstractAssociationHandler ):
387
+ class AggregationsHandler (AbstractRelationshipHandler ):
388
388
"""Handle aggregation relationships where parent receives child objects."""
389
389
390
390
def handle (self , node : nodes .AssignAttr , parent : nodes .ClassDef ) -> None :
@@ -431,7 +431,7 @@ def handle(self, node: nodes.AssignAttr, parent: nodes.ClassDef) -> None:
431
431
super ().handle (node , parent )
432
432
433
433
434
- class AssociationsHandler (AbstractAssociationHandler ):
434
+ class AssociationsHandler (AbstractRelationshipHandler ):
435
435
"""Handle regular association relationships."""
436
436
437
437
def handle (self , node : nodes .AssignAttr , parent : nodes .ClassDef ) -> None :
0 commit comments