Skip to content

Commit 2be2874

Browse files
Refactor config functions to use global constants
1 parent 9b4695b commit 2be2874

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nonebot_plugin_omikuji/config.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ def check(self) -> Config:
4141
raise ValueError("omikuji_long_cache_update_days must be greater than 0")
4242
return self
4343

44+
CONFIG: Config = get_plugin_config(Config)
45+
CAHCE_DIR: Path = get_cache_dir()
4446

4547
def get_config() -> Config:
46-
return get_plugin_config(Config)
48+
return CONFIG
4749

4850

4951
def get_cache_dir() -> Path:
50-
return get_plugin_cache_dir()
52+
return CACHE_DIR

0 commit comments

Comments
 (0)