mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
[api] refactoring: 'constants' module renamed to 'paths'
This commit is contained in:
@@ -2,7 +2,7 @@ from abc import ABC, abstractmethod
|
||||
from enum import Enum
|
||||
from typing import List, Optional
|
||||
|
||||
from bauh.api.constants import CACHE_PATH
|
||||
from bauh.api.paths import CACHE_PATH
|
||||
|
||||
|
||||
class CustomSoftwareAction:
|
||||
|
||||
@@ -7,7 +7,7 @@ from typing import Optional
|
||||
|
||||
import yaml
|
||||
|
||||
from bauh.api.constants import CONFIG_PATH
|
||||
from bauh.api.paths import CONFIG_PATH
|
||||
from bauh.commons import util
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import os
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from bauh.api.constants import CONFIG_PATH, CACHE_PATH, TEMP_DIR
|
||||
from bauh.api.paths import CONFIG_PATH, CACHE_PATH, TEMP_DIR
|
||||
from bauh.commons import resource
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from bauh.api.constants import CACHE_PATH, CONFIG_PATH, TEMP_DIR
|
||||
from bauh.api.paths import CACHE_PATH, CONFIG_PATH, TEMP_DIR
|
||||
from bauh.commons import resource
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
@@ -25,7 +25,7 @@ from bauh.api.abstract.model import PackageUpdate, PackageHistory, SoftwarePacka
|
||||
from bauh.api.abstract.view import MessageType, FormComponent, InputOption, SingleSelectComponent, SelectViewType, \
|
||||
ViewComponent, PanelComponent, MultipleSelectComponent, TextInputComponent, TextInputType, \
|
||||
FileChooserComponent, TextComponent
|
||||
from bauh.api.constants import TEMP_DIR
|
||||
from bauh.api.paths import TEMP_DIR
|
||||
from bauh.api.exception import NoInternetException
|
||||
from bauh.commons import user, system
|
||||
from bauh.commons.boot import CreateConfigFile
|
||||
|
||||
@@ -7,7 +7,7 @@ from logging import Logger
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from bauh.api.constants import CACHE_PATH
|
||||
from bauh.api.paths import CACHE_PATH
|
||||
from bauh.commons.system import ProcessHandler
|
||||
|
||||
SYNC_FILE = '{}/arch/db_sync'.format(CACHE_PATH)
|
||||
|
||||
@@ -6,7 +6,7 @@ from datetime import datetime
|
||||
from logging import Logger
|
||||
from pathlib import Path
|
||||
|
||||
from bauh.api.constants import CACHE_PATH
|
||||
from bauh.api.paths import CACHE_PATH
|
||||
|
||||
SYNC_FILE = '{}/arch/mirrors_sync'.format(CACHE_PATH)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ from pathlib import Path
|
||||
|
||||
from packaging.version import parse as parse_version
|
||||
|
||||
from bauh.api.constants import CONFIG_PATH
|
||||
from bauh.api.paths import CONFIG_PATH
|
||||
from bauh.commons import resource
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
|
||||
from bauh.api.constants import CACHE_PATH, CONFIG_PATH
|
||||
from bauh.api.paths import CACHE_PATH, CONFIG_PATH
|
||||
from bauh.commons import resource
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from bauh.api.constants import DESKTOP_ENTRIES_DIR, CONFIG_PATH, TEMP_DIR, CACHE_PATH
|
||||
from bauh.api.paths import DESKTOP_ENTRIES_DIR, CONFIG_PATH, TEMP_DIR, CACHE_PATH
|
||||
from bauh.commons import resource
|
||||
from bauh.commons.util import map_timestamp_file
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ from bauh.api.abstract.model import SoftwarePackage, CustomSoftwareAction, Packa
|
||||
SuggestionPriority, PackageStatus
|
||||
from bauh.api.abstract.view import MessageType, MultipleSelectComponent, InputOption, SingleSelectComponent, \
|
||||
SelectViewType, TextInputComponent, FormComponent, FileChooserComponent, ViewComponent, PanelComponent
|
||||
from bauh.api.constants import DESKTOP_ENTRIES_DIR
|
||||
from bauh.api.paths import DESKTOP_ENTRIES_DIR
|
||||
from bauh.commons import resource
|
||||
from bauh.commons.boot import CreateConfigFile
|
||||
from bauh.commons.html import bold
|
||||
|
||||
@@ -3,7 +3,7 @@ import os
|
||||
import re
|
||||
from typing import Optional, Dict, Tuple, Set
|
||||
|
||||
from bauh.api.constants import USER_THEMES_PATH
|
||||
from bauh.api.paths import USER_THEMES_PATH
|
||||
from bauh.view.util import resource
|
||||
from bauh.view.util.translation import I18n
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from pathlib import Path
|
||||
|
||||
from bauh.api.constants import CACHE_PATH
|
||||
from bauh.api.paths import CACHE_PATH
|
||||
|
||||
TRAY_CHECK_FILE = '{}/notify_tray'.format(CACHE_PATH) # it is a file that signals to the tray icon it should recheck for updates
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from pathlib import Path
|
||||
from packaging.version import parse as parse_version
|
||||
|
||||
from bauh import __app_name__, __version__
|
||||
from bauh.api.constants import CACHE_PATH
|
||||
from bauh.api.paths import CACHE_PATH
|
||||
from bauh.api.http import HttpClient
|
||||
from bauh.commons.html import bold, link
|
||||
from bauh.view.util.translation import I18n
|
||||
|
||||
@@ -11,7 +11,7 @@ from colorama import Fore
|
||||
|
||||
from bauh import __app_name__
|
||||
from bauh.api.abstract.controller import SoftwareManager
|
||||
from bauh.api.constants import CACHE_PATH, CONFIG_PATH
|
||||
from bauh.api.paths import CACHE_PATH, CONFIG_PATH
|
||||
from bauh.commons.system import run_cmd
|
||||
from bauh.view.util import resource
|
||||
|
||||
|
||||
Reference in New Issue
Block a user