Skip to content

Commit

Permalink
remove code support for python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
henryborchers committed Nov 25, 2024
1 parent 98d1c24 commit 7739393
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 37 deletions.
8 changes: 2 additions & 6 deletions speedwagon/frontend/qtwidgets/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@
import importlib_metadata as metadata
else:
from importlib import metadata
if sys.version_info >= (3, 9):
from importlib import resources
from importlib.resources import as_file
else:
import importlib_resources as resources
from importlib_resources import as_file
from importlib import resources
from importlib.resources import as_file

from collections import namedtuple

Expand Down
8 changes: 2 additions & 6 deletions speedwagon/frontend/qtwidgets/splashscreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
import sys
import typing
# pylint: disable=wrong-import-position
if sys.version_info >= (3, 9):
from importlib import resources
from importlib.resources import as_file
else:
import importlib_resources as resources
from importlib_resources import as_file
from importlib import resources
from importlib.resources import as_file

from PySide6 import QtWidgets, QtGui, QtCore

Expand Down
8 changes: 2 additions & 6 deletions speedwagon/frontend/qtwidgets/tabs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
from typing import Optional, Type, Dict, List
import sys
# pylint: disable=wrong-import-position
if sys.version_info >= (3, 9):
from importlib import resources
from importlib.resources import as_file
else:
import importlib_resources as resources
from importlib_resources import as_file
from importlib import resources
from importlib.resources import as_file


from PySide6 import QtWidgets, QtCore # type: ignore
Expand Down
8 changes: 2 additions & 6 deletions speedwagon/frontend/qtwidgets/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@

import sys
# pylint: disable=wrong-import-position
if sys.version_info >= (3, 9):
from importlib import resources
from importlib.resources import as_file
else:
import importlib_resources as resources
from importlib_resources import as_file
from importlib import resources
from importlib.resources import as_file

from PySide6 import QtWidgets, QtCore, QtGui
from speedwagon.frontend.qtwidgets import ui_loader, ui
Expand Down
19 changes: 6 additions & 13 deletions speedwagon/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,12 @@

NO_CANDIDATE_MESSAGE = "No candidate given to investigate"

if sys.version_info >= (3, 9):
FilePath: TypeAlias = Union[
str,
bytes,
os.PathLike[str],
os.PathLike[bytes]
]
else:
FilePath: TypeAlias = Union[
str,
bytes,
os.PathLike,
]
FilePath: TypeAlias = Union[
str,
bytes,
os.PathLike[str],
os.PathLike[bytes]
]


class AbsOptionValidator(abc.ABC):
Expand Down

0 comments on commit 7739393

Please sign in to comment.