From 1b6203d1bc246ae249cdae206ce58bf91ea6fd5e Mon Sep 17 00:00:00 2001 From: Adrien Carpentier Date: Thu, 16 May 2024 14:39:33 +0900 Subject: [PATCH 1/2] refactor: refactor pyproject.toml for PDM and organize by tools --- pyproject.toml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0afa9b4..99ff4be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,15 +21,16 @@ dependencies = [ "structlog==24.1.0", ] -[tool] -rye = { dev-dependencies = ["ruff==0.4.3"] } +[tool.pdm] +distribution = false +dev-dependencies = { dev = ["ruff==0.4.4"] } -[tool.setuptools] -py-modules = [] +[tool.rye] +dev-dependencies = ["ruff==0.4.4"] [tool.ruff] line-length = 100 +lint = { ignore-init-module-imports = true, select = ["I"] } -[tool.ruff.lint] -ignore-init-module-imports = true -select = ["I"] # sort imports +[tool.setuptools] +py-modules = [] From d605ed8633ec3237c896b295b61494e52a5290cf Mon Sep 17 00:00:00 2001 From: Adrien Carpentier Date: Thu, 16 May 2024 19:01:38 +0900 Subject: [PATCH 2/2] feat: join only on invite --- app/matrix_bot/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/matrix_bot/config.py b/app/matrix_bot/config.py index 6bb24cd..ff00e61 100644 --- a/app/matrix_bot/config.py +++ b/app/matrix_bot/config.py @@ -41,7 +41,7 @@ class BotLibConfig(BaseSettings): model_config = SettingsConfigDict(env_file=Path(".matrix_bot_env")) -bot_lib_config = BotLibConfig(join_on_invite=True) +bot_lib_config = BotLibConfig(join_on_invite=False) structlog.configure( wrapper_class=structlog.make_filtering_bound_logger(bot_lib_config.log_level), )