Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove unused imports #3005

Merged
merged 1 commit into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion bottles/backend/cabextract.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import shlex
import shutil
import subprocess
from gettext import gettext as _
from typing import Optional

from bottles.backend.logger import Logger
Expand Down
3 changes: 0 additions & 3 deletions bottles/backend/dlls/dll.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

import os
import shutil
from glob import glob
from typing import NewType, Optional
from abc import abstractmethod
from copy import deepcopy

Expand All @@ -27,7 +25,6 @@
from bottles.backend.models.enum import Arch
from bottles.backend.utils.manager import ManagerUtils
from bottles.backend.wine.reg import Reg
from bottles.backend.wine.wineboot import WineBoot

logging = Logger()

Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import os

from bottles.backend.models.config import BottleConfig
from bottles.backend.utils import yaml
import subprocess
from glob import glob
from datetime import datetime
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#

import os
from pathlib import Path
from functools import lru_cache

from bottles.backend.globals import Paths
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/managers/steamgriddb.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import os
import uuid
import requests
from functools import lru_cache

from bottles.backend.logger import Logger
from bottles.backend.models.config import BottleConfig
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/models/vdict.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#
# Original source code: <https://github.com/ValvePython/vdf>

import sys
from collections import Counter
import collections.abc as _c

Expand Down
2 changes: 0 additions & 2 deletions bottles/backend/utils/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
#

from functools import lru_cache, wraps
from threading import Lock as PyLock
from time import monotonic_ns
from typing import Callable, Dict


def cache(_func=None, *, seconds: int = 600, maxsize: int = 128, typed: bool = False):
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/utils/nvidia.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import os
from ctypes import CDLL, POINTER, Structure, addressof, c_char_p, c_int, c_void_p, cast
import subprocess

from bottles.backend.logger import Logger

Expand Down
3 changes: 1 addition & 2 deletions bottles/backend/utils/steam.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import subprocess
from typing import Union, TextIO
from typing import TextIO

from bottles.backend.models.vdict import VDFDict
from bottles.backend.utils import vdf
Expand Down
3 changes: 0 additions & 3 deletions bottles/backend/utils/vdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@
__author__ = "Rossen Georgiev"

import re
import sys
import struct
from binascii import crc32
from io import BytesIO
from io import StringIO as unicodeIO
from collections.abc import Mapping

from bottles.backend.models.vdict import VDFDict

string_type = str
int_type = int
BOMS = '\ufffe\ufeff'
Expand Down
2 changes: 0 additions & 2 deletions bottles/backend/utils/vulkan.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import shutil
import subprocess

from bottles.backend.utils.display import DisplayUtils


class VulkanUtils:
__vk_icd_dirs = [
Expand Down
2 changes: 1 addition & 1 deletion bottles/backend/wine/cmd.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import NewType, Optional
from typing import Optional

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/control.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/drives.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.models.config import BottleConfig
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/eject.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/expand.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
2 changes: 1 addition & 1 deletion bottles/backend/wine/explorer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import NewType, Optional
from typing import Optional

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/hh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/icinfo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
2 changes: 1 addition & 1 deletion bottles/backend/wine/msiexec.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import NewType, Optional
from typing import Optional

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
2 changes: 1 addition & 1 deletion bottles/backend/wine/net.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import NewType, Optional
from typing import Optional

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
2 changes: 1 addition & 1 deletion bottles/backend/wine/notepad.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import NewType, Optional
from typing import Optional

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/oleview.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/progman.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/regedit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/regkeys.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.models.config import BottleConfig
Expand Down
3 changes: 0 additions & 3 deletions bottles/backend/wine/regsvr32.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import os
import uuid
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/rundll32.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
2 changes: 1 addition & 1 deletion bottles/backend/wine/start.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import NewType, Optional
from typing import Optional

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/taskmgr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
2 changes: 1 addition & 1 deletion bottles/backend/wine/uninstaller.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import NewType, Optional
from typing import Optional

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
2 changes: 0 additions & 2 deletions bottles/backend/wine/wineboot.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import subprocess
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/winebridge.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/winecfg.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
2 changes: 1 addition & 1 deletion bottles/backend/wine/winedbg.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import re
import time
import subprocess
from typing import NewType, Optional
from typing import Optional

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/winefile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/winepath.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import re
from typing import NewType
from functools import lru_cache

from bottles.backend.logger import Logger
Expand Down
1 change: 0 additions & 1 deletion bottles/backend/wine/winhelp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import NewType

from bottles.backend.logger import Logger
from bottles.backend.wine.wineprogram import WineProgram
Expand Down
2 changes: 1 addition & 1 deletion bottles/backend/wine/xcopy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import NewType, Optional
from typing import Optional
from datetime import datetime

from bottles.backend.logger import Logger
Expand Down
3 changes: 1 addition & 2 deletions bottles/frontend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import gettext
import locale
import webbrowser
import subprocess
from os import path

gi.require_version('Gtk', '4.0')
Expand All @@ -30,7 +29,7 @@
#gi.require_version("Xdp", "1.0")
#gi.require_version("XdpGtk4", "1.0")

from gi.repository import Gtk, Gio, Gdk, GLib, GObject, Adw
from gi.repository import Gtk, Gio, GLib, GObject, Adw

from bottles.frontend.params import *
from bottles.backend.logger import Logger
Expand Down
2 changes: 0 additions & 2 deletions bottles/frontend/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

import webbrowser

from gi.repository import GLib


def open_doc_url(widget, page):
webbrowser.open_new_tab(f"https://docs.usebottles.com/{page}")
1 change: 0 additions & 1 deletion bottles/frontend/views/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#

import contextlib
import re
from gettext import gettext as _

from gi.repository import Gtk, Adw, GObject
Expand Down
2 changes: 1 addition & 1 deletion bottles/frontend/widgets/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

from gi.repository import Gtk, GLib, Adw
from gi.repository import Gtk, Adw
from gettext import gettext as _
import webbrowser

Expand Down
2 changes: 1 addition & 1 deletion bottles/frontend/windows/depscheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

from gi.repository import Gtk, GLib, Adw
from gi.repository import Gtk, Adw


@Gtk.Template(resource_path='/com/usebottles/bottles/dialog-deps-check.ui')
Expand Down
1 change: 0 additions & 1 deletion bottles/frontend/windows/envvars.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import re
from gi.repository import Gtk, GLib, Adw

from bottles.frontend.utils.gtk import GtkUtils
Expand Down
3 changes: 0 additions & 3 deletions bottles/frontend/windows/exclusionpatterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import re
from gi.repository import Gtk, GLib, Adw

from bottles.frontend.utils.gtk import GtkUtils


@Gtk.Template(resource_path='/com/usebottles/bottles/exclusion-pattern-entry.ui')
class ExclusionPatternEntry(Adw.ActionRow):
Expand Down
4 changes: 1 addition & 3 deletions bottles/frontend/windows/fsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import os
from gi.repository import Gtk, GLib, Adw, Gdk
from bottles.backend.utils.manager import ManagerUtils
from gi.repository import Gtk, GLib, Adw
from bottles.backend.logger import Logger

logging = Logger()
Expand Down
1 change: 0 additions & 1 deletion bottles/frontend/windows/gamescope.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import re
from gi.repository import Gtk, GLib, Adw


Expand Down
1 change: 0 additions & 1 deletion bottles/frontend/windows/launchoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import os
from gi.repository import Gtk, GLib, GObject, Adw

from bottles.backend.utils.manager import ManagerUtils
Expand Down
2 changes: 1 addition & 1 deletion bottles/frontend/windows/protonalert.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

from gi.repository import Gtk, GLib, Adw
from gi.repository import Gtk, Adw


@Gtk.Template(resource_path='/com/usebottles/bottles/dialog-proton-alert.ui')
Expand Down
3 changes: 1 addition & 2 deletions bottles/frontend/windows/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

import re
from gi.repository import Gtk, GLib, Adw
from gi.repository import Gtk, Adw


@Gtk.Template(resource_path='/com/usebottles/bottles/dialog-sandbox.ui')
Expand Down
2 changes: 1 addition & 1 deletion bottles/frontend/windows/vkbasalt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'''

import os
from gi.repository import Gtk, GLib, Adw, Gdk
from gi.repository import Gtk, GLib, Adw
from vkbasalt.lib import parse, ParseConfig
from bottles.backend.utils.manager import ManagerUtils
from bottles.backend.logger import Logger
Expand Down