Проверка шаблона шины для iOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
518B

  1. def isToggle(name, structure):
  2. # Проверяем наличие `toggle` в свойствах канала ядра.
  3. if name in structure.core.pipes:
  4. props = structure.core.pipes[name]
  5. if "toggle" in props:
  6. return True
  7. # Проверяем наличие `toggle` в свойствах канала сервиса.
  8. if name in structure.service.pipes:
  9. props = structure.service.pipes[name]
  10. if "toggle" in props:
  11. return True
  12. return False