Advertisement
Guest User

Untitled

a guest
May 24th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # employee.py ===============
  2. # This is required for the type hinting, which affects actual execution behavior
  3. from typing import TYPE_CHECKING
  4.  
  5. if TYPE_CHECKING:
  6.     from .company import Company
  7.  
  8. class Employee(Object):
  9.     company: Company
  10.  
  11. # company.py ===============
  12. # Also required
  13. from typing import Sequence, TYPE_CHECKING
  14.  
  15. if TYPE_CHECKING:
  16.     from .employee import Employee
  17.  
  18. class Company(Object):
  19.     employees: Sequence[Employee]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement