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