From cddb1b983d87cf0758afabba5ae02217a6284a89 Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Tue, 24 Oct 2023 16:27:52 +0800 Subject: [PATCH] fix: Global repository setting results in TypeError Fixes #2330 Signed-off-by: Frost Ming --- news/2330.bugfix.md | 1 + src/pdm/project/config.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 news/2330.bugfix.md diff --git a/news/2330.bugfix.md b/news/2330.bugfix.md new file mode 100644 index 0000000000..d282e93e10 --- /dev/null +++ b/news/2330.bugfix.md @@ -0,0 +1 @@ +Fix a bug that global repository setting results in TypeError . diff --git a/src/pdm/project/config.py b/src/pdm/project/config.py index 5ee1f5b19a..c41729d755 100644 --- a/src/pdm/project/config.py +++ b/src/pdm/project/config.py @@ -229,7 +229,7 @@ def get_defaults(cls) -> dict[str, Any]: defaults = {k: v.default for k, v in cls._config_map.items() if v.should_show()} if cls.site is None: cls.site = Config(platformdirs.site_config_path("pdm") / "config.toml") - defaults.update(cls.site) + defaults.update(cls.site.self_data) return defaults @cached_property