Skip to content

Commit

Permalink
✨ Feature: 适配 QQ 群机器人 (cscs181/QQ-GitHub-Bot#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Oct 12, 2023
1 parent 5992e2f commit fa098a3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions nonebot_plugin_sentry/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@Author : yanyongyu
@Date : 2020-11-23 18:44:18
@LastEditors : yanyongyu
@LastEditTime : 2023-10-02 17:06:47
@LastEditTime : 2023-10-11 11:24:03
@Description : Config for Sentry plugin
@GitHub : https://github.com/yanyongyu
"""
Expand All @@ -18,14 +18,18 @@
driver = get_driver()


class Config(BaseModel, extra=Extra.allow):
class Config(BaseModel):
sentry_dsn: Optional[str]
sentry_environment: str = driver.env
sentry_integrations: List[Integration] = Field(default_factory=list)

# [FIXED] https://github.com/getsentry/sentry-python/issues/653
# sentry_default_integrations: bool = False

class Config:
extra = Extra.allow
arbitrary_types_allowed = True

@root_validator(pre=True)
def filter_sentry_configs(cls, values: Dict[str, Any]):
return {
Expand Down

0 comments on commit fa098a3

Please sign in to comment.