Инспекция кода
This commit is contained in:
@@ -175,14 +175,20 @@ class SettingUtils:
|
||||
return data['project']['version']
|
||||
|
||||
@classmethod
|
||||
def get_config_files(cls) -> list[str]:
|
||||
def get_config_files(cls, extra: list[str] | None = None) -> list[str]:
|
||||
"""
|
||||
Возвращает список файлов конфигурации
|
||||
|
||||
:param extra: Дополнительные файлы конфигурации
|
||||
|
||||
:return: Список файлов конфигурации
|
||||
"""
|
||||
|
||||
return [file for file in cls.__config_files.values() if file is not None]
|
||||
predefined_configs = [
|
||||
file for file in cls.__config_files.values() if file is not None
|
||||
]
|
||||
|
||||
return predefined_configs + (extra if extra else [])
|
||||
|
||||
@classmethod
|
||||
def set_config_file(cls, name: str, full_path: str | None) -> None:
|
||||
@@ -196,14 +202,16 @@ class SettingUtils:
|
||||
cls.__config_files[name] = full_path
|
||||
|
||||
@classmethod
|
||||
def get_installed_apps(cls) -> list[str]:
|
||||
def get_installed_apps(cls, extra: list[str] | None = None) -> list[str]:
|
||||
"""
|
||||
Возвращает список установленных приложений
|
||||
|
||||
:param extra: Дополнительные приложения
|
||||
|
||||
:return: Список установленных приложений
|
||||
"""
|
||||
|
||||
return [
|
||||
predefined_apps = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.admindocs',
|
||||
'django.contrib.auth',
|
||||
@@ -216,6 +224,8 @@ class SettingUtils:
|
||||
'net.xeaf.rack',
|
||||
]
|
||||
|
||||
return predefined_apps + (extra if extra else [])
|
||||
|
||||
@classmethod
|
||||
def _check_initialization(cls) -> None:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user