__init__.py 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. from typing import Annotated, Literal, Optional
  2. from pydantic import (
  3. AliasChoices,
  4. Field,
  5. HttpUrl,
  6. NegativeInt,
  7. NonNegativeInt,
  8. PositiveFloat,
  9. PositiveInt,
  10. computed_field,
  11. )
  12. from pydantic_settings import BaseSettings
  13. from configs.feature.hosted_service import HostedServiceConfig
  14. class SecurityConfig(BaseSettings):
  15. """
  16. Security-related configurations for the application
  17. """
  18. SECRET_KEY: str = Field(
  19. description="Secret key for secure session cookie signing."
  20. "Make sure you are changing this key for your deployment with a strong key."
  21. "Generate a strong key using `openssl rand -base64 42` or set via the `SECRET_KEY` environment variable.",
  22. default="",
  23. )
  24. RESET_PASSWORD_TOKEN_EXPIRY_MINUTES: PositiveInt = Field(
  25. description="Duration in minutes for which a password reset token remains valid",
  26. default=5,
  27. )
  28. LOGIN_DISABLED: bool = Field(
  29. description="Whether to disable login checks",
  30. default=False,
  31. )
  32. ADMIN_API_KEY_ENABLE: bool = Field(
  33. description="Whether to enable admin api key for authentication",
  34. default=False,
  35. )
  36. ADMIN_API_KEY: Optional[str] = Field(
  37. description="admin api key for authentication",
  38. default=None,
  39. )
  40. class AppExecutionConfig(BaseSettings):
  41. """
  42. Configuration parameters for application execution
  43. """
  44. APP_MAX_EXECUTION_TIME: PositiveInt = Field(
  45. description="Maximum allowed execution time for the application in seconds",
  46. default=1200,
  47. )
  48. APP_MAX_ACTIVE_REQUESTS: NonNegativeInt = Field(
  49. description="Maximum number of concurrent active requests per app (0 for unlimited)",
  50. default=0,
  51. )
  52. class CodeExecutionSandboxConfig(BaseSettings):
  53. """
  54. Configuration for the code execution sandbox environment
  55. """
  56. CODE_EXECUTION_ENDPOINT: HttpUrl = Field(
  57. description="URL endpoint for the code execution service",
  58. default="http://sandbox:8194",
  59. )
  60. CODE_EXECUTION_API_KEY: str = Field(
  61. description="API key for accessing the code execution service",
  62. default="dify-sandbox",
  63. )
  64. CODE_EXECUTION_CONNECT_TIMEOUT: Optional[float] = Field(
  65. description="Connection timeout in seconds for code execution requests",
  66. default=10.0,
  67. )
  68. CODE_EXECUTION_READ_TIMEOUT: Optional[float] = Field(
  69. description="Read timeout in seconds for code execution requests",
  70. default=60.0,
  71. )
  72. CODE_EXECUTION_WRITE_TIMEOUT: Optional[float] = Field(
  73. description="Write timeout in seconds for code execution request",
  74. default=10.0,
  75. )
  76. CODE_MAX_NUMBER: PositiveInt = Field(
  77. description="Maximum allowed numeric value in code execution",
  78. default=9223372036854775807,
  79. )
  80. CODE_MIN_NUMBER: NegativeInt = Field(
  81. description="Minimum allowed numeric value in code execution",
  82. default=-9223372036854775807,
  83. )
  84. CODE_MAX_DEPTH: PositiveInt = Field(
  85. description="Maximum allowed depth for nested structures in code execution",
  86. default=5,
  87. )
  88. CODE_MAX_PRECISION: PositiveInt = Field(
  89. description="mMaximum number of decimal places for floating-point numbers in code execution",
  90. default=20,
  91. )
  92. CODE_MAX_STRING_LENGTH: PositiveInt = Field(
  93. description="Maximum allowed length for strings in code execution",
  94. default=80000,
  95. )
  96. CODE_MAX_STRING_ARRAY_LENGTH: PositiveInt = Field(
  97. description="Maximum allowed length for string arrays in code execution",
  98. default=30,
  99. )
  100. CODE_MAX_OBJECT_ARRAY_LENGTH: PositiveInt = Field(
  101. description="Maximum allowed length for object arrays in code execution",
  102. default=30,
  103. )
  104. CODE_MAX_NUMBER_ARRAY_LENGTH: PositiveInt = Field(
  105. description="Maximum allowed length for numeric arrays in code execution",
  106. default=1000,
  107. )
  108. class EndpointConfig(BaseSettings):
  109. """
  110. Configuration for various application endpoints and URLs
  111. """
  112. CONSOLE_API_URL: str = Field(
  113. description="Base URL for the console API,"
  114. "used for login authentication callback or notion integration callbacks",
  115. default="",
  116. )
  117. CONSOLE_WEB_URL: str = Field(
  118. description="Base URL for the console web interface," "used for frontend references and CORS configuration",
  119. default="",
  120. )
  121. SERVICE_API_URL: str = Field(
  122. description="Base URL for the service API, displayed to users for API access",
  123. default="",
  124. )
  125. APP_WEB_URL: str = Field(
  126. description="Base URL for the web application, used for frontend references",
  127. default="",
  128. )
  129. class FileAccessConfig(BaseSettings):
  130. """
  131. Configuration for file access and handling
  132. """
  133. FILES_URL: str = Field(
  134. description="Base URL for file preview or download,"
  135. " used for frontend display and multi-model inputs"
  136. "Url is signed and has expiration time.",
  137. validation_alias=AliasChoices("FILES_URL", "CONSOLE_API_URL"),
  138. alias_priority=1,
  139. default="",
  140. )
  141. FILES_ACCESS_TIMEOUT: int = Field(
  142. description="Expiration time in seconds for file access URLs",
  143. default=300,
  144. )
  145. class FileUploadConfig(BaseSettings):
  146. """
  147. Configuration for file upload limitations
  148. """
  149. UPLOAD_FILE_SIZE_LIMIT: NonNegativeInt = Field(
  150. description="Maximum allowed file size for uploads in megabytes",
  151. default=15,
  152. )
  153. UPLOAD_FILE_BATCH_LIMIT: NonNegativeInt = Field(
  154. description="Maximum number of files allowed in a single upload batch",
  155. default=5,
  156. )
  157. UPLOAD_IMAGE_FILE_SIZE_LIMIT: NonNegativeInt = Field(
  158. description="Maximum allowed image file size for uploads in megabytes",
  159. default=10,
  160. )
  161. UPLOAD_VIDEO_FILE_SIZE_LIMIT: NonNegativeInt = Field(
  162. description="video file size limit in Megabytes for uploading files",
  163. default=100,
  164. )
  165. UPLOAD_AUDIO_FILE_SIZE_LIMIT: NonNegativeInt = Field(
  166. description="audio file size limit in Megabytes for uploading files",
  167. default=50,
  168. )
  169. BATCH_UPLOAD_LIMIT: NonNegativeInt = Field(
  170. description="Maximum number of files allowed in a batch upload operation",
  171. default=20,
  172. )
  173. class HttpConfig(BaseSettings):
  174. """
  175. HTTP-related configurations for the application
  176. """
  177. API_COMPRESSION_ENABLED: bool = Field(
  178. description="Enable or disable gzip compression for HTTP responses",
  179. default=False,
  180. )
  181. inner_CONSOLE_CORS_ALLOW_ORIGINS: str = Field(
  182. description="Comma-separated list of allowed origins for CORS in the console",
  183. validation_alias=AliasChoices("CONSOLE_CORS_ALLOW_ORIGINS", "CONSOLE_WEB_URL"),
  184. default="",
  185. )
  186. @computed_field
  187. @property
  188. def CONSOLE_CORS_ALLOW_ORIGINS(self) -> list[str]:
  189. return self.inner_CONSOLE_CORS_ALLOW_ORIGINS.split(",")
  190. inner_WEB_API_CORS_ALLOW_ORIGINS: str = Field(
  191. description="",
  192. validation_alias=AliasChoices("WEB_API_CORS_ALLOW_ORIGINS"),
  193. default="*",
  194. )
  195. @computed_field
  196. @property
  197. def WEB_API_CORS_ALLOW_ORIGINS(self) -> list[str]:
  198. return self.inner_WEB_API_CORS_ALLOW_ORIGINS.split(",")
  199. HTTP_REQUEST_MAX_CONNECT_TIMEOUT: Annotated[
  200. PositiveInt, Field(ge=10, description="Maximum connection timeout in seconds for HTTP requests")
  201. ] = 10
  202. HTTP_REQUEST_MAX_READ_TIMEOUT: Annotated[
  203. PositiveInt, Field(ge=60, description="Maximum read timeout in seconds for HTTP requests")
  204. ] = 60
  205. HTTP_REQUEST_MAX_WRITE_TIMEOUT: Annotated[
  206. PositiveInt, Field(ge=10, description="Maximum write timeout in seconds for HTTP requests")
  207. ] = 20
  208. HTTP_REQUEST_NODE_MAX_BINARY_SIZE: PositiveInt = Field(
  209. description="Maximum allowed size in bytes for binary data in HTTP requests",
  210. default=10 * 1024 * 1024,
  211. )
  212. HTTP_REQUEST_NODE_MAX_TEXT_SIZE: PositiveInt = Field(
  213. description="Maximum allowed size in bytes for text data in HTTP requests",
  214. default=1 * 1024 * 1024,
  215. )
  216. SSRF_PROXY_HTTP_URL: Optional[str] = Field(
  217. description="Proxy URL for HTTP requests to prevent Server-Side Request Forgery (SSRF)",
  218. default=None,
  219. )
  220. SSRF_PROXY_HTTPS_URL: Optional[str] = Field(
  221. description="Proxy URL for HTTPS requests to prevent Server-Side Request Forgery (SSRF)",
  222. default=None,
  223. )
  224. RESPECT_XFORWARD_HEADERS_ENABLED: bool = Field(
  225. description="Enable or disable the X-Forwarded-For Proxy Fix middleware from Werkzeug"
  226. " to respect X-* headers to redirect clients",
  227. default=False,
  228. )
  229. class InnerAPIConfig(BaseSettings):
  230. """
  231. Configuration for internal API functionality
  232. """
  233. INNER_API: bool = Field(
  234. description="Enable or disable the internal API",
  235. default=False,
  236. )
  237. INNER_API_KEY: Optional[str] = Field(
  238. description="API key for accessing the internal API",
  239. default=None,
  240. )
  241. class LoggingConfig(BaseSettings):
  242. """
  243. Configuration for application logging
  244. """
  245. LOG_LEVEL: str = Field(
  246. description="Logging level, default to INFO. Set to ERROR for production environments.",
  247. default="INFO",
  248. )
  249. LOG_FILE: Optional[str] = Field(
  250. description="File path for log output.",
  251. default=None,
  252. )
  253. LOG_FILE_MAX_SIZE: PositiveInt = Field(
  254. description="Maximum file size for file rotation retention, the unit is megabytes (MB)",
  255. default=20,
  256. )
  257. LOG_FILE_BACKUP_COUNT: PositiveInt = Field(
  258. description="Maximum file backup count file rotation retention",
  259. default=5,
  260. )
  261. LOG_FORMAT: str = Field(
  262. description="Format string for log messages",
  263. default="%(asctime)s.%(msecs)03d %(levelname)s [%(threadName)s] [%(filename)s:%(lineno)d] - %(message)s",
  264. )
  265. LOG_DATEFORMAT: Optional[str] = Field(
  266. description="Date format string for log timestamps",
  267. default=None,
  268. )
  269. LOG_TZ: Optional[str] = Field(
  270. description="Timezone for log timestamps (e.g., 'America/New_York')",
  271. default=None,
  272. )
  273. class ModelLoadBalanceConfig(BaseSettings):
  274. """
  275. Configuration for model load balancing
  276. """
  277. MODEL_LB_ENABLED: bool = Field(
  278. description="Enable or disable load balancing for models",
  279. default=False,
  280. )
  281. class BillingConfig(BaseSettings):
  282. """
  283. Configuration for platform billing features
  284. """
  285. BILLING_ENABLED: bool = Field(
  286. description="Enable or disable billing functionality",
  287. default=False,
  288. )
  289. class UpdateConfig(BaseSettings):
  290. """
  291. Configuration for application update checks
  292. """
  293. CHECK_UPDATE_URL: str = Field(
  294. description="URL to check for application updates",
  295. default="https://updates.dify.ai",
  296. )
  297. class WorkflowConfig(BaseSettings):
  298. """
  299. Configuration for workflow execution
  300. """
  301. WORKFLOW_MAX_EXECUTION_STEPS: PositiveInt = Field(
  302. description="Maximum number of steps allowed in a single workflow execution",
  303. default=500,
  304. )
  305. WORKFLOW_MAX_EXECUTION_TIME: PositiveInt = Field(
  306. description="Maximum execution time in seconds for a single workflow",
  307. default=1200,
  308. )
  309. WORKFLOW_CALL_MAX_DEPTH: PositiveInt = Field(
  310. description="Maximum allowed depth for nested workflow calls",
  311. default=5,
  312. )
  313. MAX_VARIABLE_SIZE: PositiveInt = Field(
  314. description="Maximum size in bytes for a single variable in workflows. Default to 200 KB.",
  315. default=200 * 1024,
  316. )
  317. class AuthConfig(BaseSettings):
  318. """
  319. Configuration for authentication and OAuth
  320. """
  321. OAUTH_REDIRECT_PATH: str = Field(
  322. description="Redirect path for OAuth authentication callbacks",
  323. default="/console/api/oauth/authorize",
  324. )
  325. GITHUB_CLIENT_ID: Optional[str] = Field(
  326. description="GitHub OAuth client ID",
  327. default=None,
  328. )
  329. GITHUB_CLIENT_SECRET: Optional[str] = Field(
  330. description="GitHub OAuth client secret",
  331. default=None,
  332. )
  333. GOOGLE_CLIENT_ID: Optional[str] = Field(
  334. description="Google OAuth client ID",
  335. default=None,
  336. )
  337. GOOGLE_CLIENT_SECRET: Optional[str] = Field(
  338. description="Google OAuth client secret",
  339. default=None,
  340. )
  341. ACCESS_TOKEN_EXPIRE_MINUTES: PositiveInt = Field(
  342. description="Expiration time for access tokens in minutes",
  343. default=60,
  344. )
  345. class ModerationConfig(BaseSettings):
  346. """
  347. Configuration for content moderation
  348. """
  349. MODERATION_BUFFER_SIZE: PositiveInt = Field(
  350. description="Size of the buffer for content moderation processing",
  351. default=300,
  352. )
  353. class ToolConfig(BaseSettings):
  354. """
  355. Configuration for tool management
  356. """
  357. TOOL_ICON_CACHE_MAX_AGE: PositiveInt = Field(
  358. description="Maximum age in seconds for caching tool icons",
  359. default=3600,
  360. )
  361. class MailConfig(BaseSettings):
  362. """
  363. Configuration for email services
  364. """
  365. MAIL_TYPE: Optional[str] = Field(
  366. description="Email service provider type ('smtp' or 'resend'), default to None.",
  367. default=None,
  368. )
  369. MAIL_DEFAULT_SEND_FROM: Optional[str] = Field(
  370. description="Default email address to use as the sender",
  371. default=None,
  372. )
  373. RESEND_API_KEY: Optional[str] = Field(
  374. description="API key for Resend email service",
  375. default=None,
  376. )
  377. RESEND_API_URL: Optional[str] = Field(
  378. description="API URL for Resend email service",
  379. default=None,
  380. )
  381. SMTP_SERVER: Optional[str] = Field(
  382. description="SMTP server hostname",
  383. default=None,
  384. )
  385. SMTP_PORT: Optional[int] = Field(
  386. description="SMTP server port number",
  387. default=465,
  388. )
  389. SMTP_USERNAME: Optional[str] = Field(
  390. description="Username for SMTP authentication",
  391. default=None,
  392. )
  393. SMTP_PASSWORD: Optional[str] = Field(
  394. description="Password for SMTP authentication",
  395. default=None,
  396. )
  397. SMTP_USE_TLS: bool = Field(
  398. description="Enable TLS encryption for SMTP connections",
  399. default=False,
  400. )
  401. SMTP_OPPORTUNISTIC_TLS: bool = Field(
  402. description="Enable opportunistic TLS for SMTP connections",
  403. default=False,
  404. )
  405. EMAIL_SEND_IP_LIMIT_PER_MINUTE: PositiveInt = Field(
  406. description="Maximum number of emails allowed to be sent from the same IP address in a minute",
  407. default=50,
  408. )
  409. class RagEtlConfig(BaseSettings):
  410. """
  411. Configuration for RAG ETL processes
  412. """
  413. # TODO: This config is not only for rag etl, it is also for file upload, we should move it to file upload config
  414. ETL_TYPE: str = Field(
  415. description="RAG ETL type ('dify' or 'Unstructured'), default to 'dify'",
  416. default="dify",
  417. )
  418. KEYWORD_DATA_SOURCE_TYPE: str = Field(
  419. description="Data source type for keyword extraction"
  420. " ('database' or other supported types), default to 'database'",
  421. default="database",
  422. )
  423. UNSTRUCTURED_API_URL: Optional[str] = Field(
  424. description="API URL for Unstructured.io service",
  425. default=None,
  426. )
  427. UNSTRUCTURED_API_KEY: Optional[str] = Field(
  428. description="API key for Unstructured.io service",
  429. default=None,
  430. )
  431. class DataSetConfig(BaseSettings):
  432. """
  433. Configuration for dataset management
  434. """
  435. PLAN_SANDBOX_CLEAN_DAY_SETTING: PositiveInt = Field(
  436. description="Interval in days for dataset cleanup operations - plan: sandbox",
  437. default=30,
  438. )
  439. PLAN_PRO_CLEAN_DAY_SETTING: PositiveInt = Field(
  440. description="Interval in days for dataset cleanup operations - plan: pro and team",
  441. default=7,
  442. )
  443. DATASET_OPERATOR_ENABLED: bool = Field(
  444. description="Enable or disable dataset operator functionality",
  445. default=False,
  446. )
  447. class WorkspaceConfig(BaseSettings):
  448. """
  449. Configuration for workspace management
  450. """
  451. INVITE_EXPIRY_HOURS: PositiveInt = Field(
  452. description="Expiration time in hours for workspace invitation links",
  453. default=72,
  454. )
  455. class IndexingConfig(BaseSettings):
  456. """
  457. Configuration for indexing operations
  458. """
  459. INDEXING_MAX_SEGMENTATION_TOKENS_LENGTH: PositiveInt = Field(
  460. description="Maximum token length for text segmentation during indexing",
  461. default=1000,
  462. )
  463. class ImageFormatConfig(BaseSettings):
  464. MULTIMODAL_SEND_IMAGE_FORMAT: Literal["base64", "url"] = Field(
  465. description="Format for sending images in multimodal contexts ('base64' or 'url'), default is base64",
  466. default="base64",
  467. )
  468. class CeleryBeatConfig(BaseSettings):
  469. CELERY_BEAT_SCHEDULER_TIME: int = Field(
  470. description="Interval in days for Celery Beat scheduler execution, default to 1 day",
  471. default=1,
  472. )
  473. class PositionConfig(BaseSettings):
  474. POSITION_PROVIDER_PINS: str = Field(
  475. description="Comma-separated list of pinned model providers",
  476. default="",
  477. )
  478. POSITION_PROVIDER_INCLUDES: str = Field(
  479. description="Comma-separated list of included model providers",
  480. default="",
  481. )
  482. POSITION_PROVIDER_EXCLUDES: str = Field(
  483. description="Comma-separated list of excluded model providers",
  484. default="",
  485. )
  486. POSITION_TOOL_PINS: str = Field(
  487. description="Comma-separated list of pinned tools",
  488. default="",
  489. )
  490. POSITION_TOOL_INCLUDES: str = Field(
  491. description="Comma-separated list of included tools",
  492. default="",
  493. )
  494. POSITION_TOOL_EXCLUDES: str = Field(
  495. description="Comma-separated list of excluded tools",
  496. default="",
  497. )
  498. @computed_field
  499. def POSITION_PROVIDER_PINS_LIST(self) -> list[str]:
  500. return [item.strip() for item in self.POSITION_PROVIDER_PINS.split(",") if item.strip() != ""]
  501. @computed_field
  502. def POSITION_PROVIDER_INCLUDES_SET(self) -> set[str]:
  503. return {item.strip() for item in self.POSITION_PROVIDER_INCLUDES.split(",") if item.strip() != ""}
  504. @computed_field
  505. def POSITION_PROVIDER_EXCLUDES_SET(self) -> set[str]:
  506. return {item.strip() for item in self.POSITION_PROVIDER_EXCLUDES.split(",") if item.strip() != ""}
  507. @computed_field
  508. def POSITION_TOOL_PINS_LIST(self) -> list[str]:
  509. return [item.strip() for item in self.POSITION_TOOL_PINS.split(",") if item.strip() != ""]
  510. @computed_field
  511. def POSITION_TOOL_INCLUDES_SET(self) -> set[str]:
  512. return {item.strip() for item in self.POSITION_TOOL_INCLUDES.split(",") if item.strip() != ""}
  513. @computed_field
  514. def POSITION_TOOL_EXCLUDES_SET(self) -> set[str]:
  515. return {item.strip() for item in self.POSITION_TOOL_EXCLUDES.split(",") if item.strip() != ""}
  516. class LoginConfig(BaseSettings):
  517. ENABLE_EMAIL_CODE_LOGIN: bool = Field(
  518. description="whether to enable email code login",
  519. default=False,
  520. )
  521. ENABLE_EMAIL_PASSWORD_LOGIN: bool = Field(
  522. description="whether to enable email password login",
  523. default=True,
  524. )
  525. ENABLE_SOCIAL_OAUTH_LOGIN: bool = Field(
  526. description="whether to enable github/google oauth login",
  527. default=False,
  528. )
  529. EMAIL_CODE_LOGIN_TOKEN_EXPIRY_MINUTES: PositiveInt = Field(
  530. description="expiry time in minutes for email code login token",
  531. default=5,
  532. )
  533. ALLOW_REGISTER: bool = Field(
  534. description="whether to enable register",
  535. default=False,
  536. )
  537. ALLOW_CREATE_WORKSPACE: bool = Field(
  538. description="whether to enable create workspace",
  539. default=False,
  540. )
  541. class FeatureConfig(
  542. # place the configs in alphabet order
  543. AppExecutionConfig,
  544. AuthConfig, # Changed from OAuthConfig to AuthConfig
  545. BillingConfig,
  546. CodeExecutionSandboxConfig,
  547. DataSetConfig,
  548. EndpointConfig,
  549. FileAccessConfig,
  550. FileUploadConfig,
  551. HttpConfig,
  552. ImageFormatConfig,
  553. InnerAPIConfig,
  554. IndexingConfig,
  555. LoggingConfig,
  556. MailConfig,
  557. ModelLoadBalanceConfig,
  558. ModerationConfig,
  559. PositionConfig,
  560. RagEtlConfig,
  561. SecurityConfig,
  562. ToolConfig,
  563. UpdateConfig,
  564. WorkflowConfig,
  565. WorkspaceConfig,
  566. LoginConfig,
  567. # hosted services config
  568. HostedServiceConfig,
  569. CeleryBeatConfig,
  570. ):
  571. pass