config_error.py 900 B

1234567891011121314151617181920212223242526
  1. # This Python file uses the following encoding: utf-8
  2. # @author runhey
  3. # github https://github.com/runhey
  4. from pydantic import BaseModel, ValidationError, validator, Field
  5. from tasks.Component.config_base import MultiLine
  6. from module.logger import logger
  7. class Error(BaseModel):
  8. handle_error: bool = Field(default=True,
  9. description='handle_error_help')
  10. error_repeated: bool = Field(default=False,
  11. description='是否多次出错关闭模拟器')
  12. save_error: bool = Field(default=True,
  13. description='')
  14. screenshot_length: int = Field(
  15. default=1,
  16. description='',
  17. ge=1,
  18. )
  19. notify_enable: bool = Field(default=False,
  20. description='')
  21. notify_config: MultiLine = Field(default='provider: null', description='notify_config_help')