File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -370,8 +370,8 @@ def remove_builtin_plugin(self, plugin: str) -> None:
370370class DefaultConfigPolicy (_ConfigPolicy [NoneBotConfig ]):
371371 @staticmethod
372372 def test_format (cfg : dict [str , Any ]) -> bool :
373- return isinstance (cfg .setdefault ("adapters" , {}), dict ) and isinstance (
374- cfg .setdefault ("plugins" , {}), dict
373+ return isinstance (cfg .get ("adapters" , {}), dict ) and isinstance (
374+ cfg .get ("plugins" , {}), dict
375375 )
376376
377377 def get_nonebot_config (self ) -> NoneBotConfig :
@@ -447,8 +447,8 @@ def remove_plugin(
447447class LegacyConfigPolicy (_ConfigPolicy [LegacyNoneBotConfig ]):
448448 @staticmethod
449449 def test_format (cfg : dict [str , Any ]) -> bool :
450- result = isinstance (cfg .setdefault ("adapters" , []), list ) and isinstance (
451- cfg .setdefault ("plugins" , []), list
450+ result = isinstance (cfg .get ("adapters" , []), list ) and isinstance (
451+ cfg .get ("plugins" , []), list
452452 )
453453 if result :
454454 click .secho (
You can’t perform that action at this time.
0 commit comments