Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

enums.py 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #
  2. # Copyright 2025 The InfiniFlow Authors. All Rights Reserved.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. from enum import Enum
  17. class SupportLanguage(str, Enum):
  18. PYTHON = "python"
  19. NODEJS = "nodejs"
  20. class ResultStatus(str, Enum):
  21. SUCCESS = "success"
  22. PROGRAM_ERROR = "program_error"
  23. RESOURCE_LIMIT_EXCEEDED = "resource_limit_exceeded"
  24. UNAUTHORIZED_ACCESS = "unauthorized_access"
  25. RUNTIME_ERROR = "runtime_error"
  26. PROGRAM_RUNNER_ERROR = "program_runner_error"
  27. class ResourceLimitType(str, Enum):
  28. TIME = "time"
  29. MEMORY = "memory"
  30. OUTPUT = "output"
  31. class UnauthorizedAccessType(str, Enum):
  32. DISALLOWED_SYSCALL = "disallowed_syscall"
  33. FILE_ACCESS = "file_access"
  34. NETWORK_ACCESS = "network_access"
  35. class RuntimeErrorType(str, Enum):
  36. SIGNALLED = "signalled"
  37. NONZERO_EXIT = "nonzero_exit"