Skip to content

Commit

Permalink
repo: remove deprecated usage of importlib_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinevg committed Jan 29, 2025
1 parent 8177e6f commit 88b83f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
5 changes: 1 addition & 4 deletions cynthion/python/src/commands/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
import textwrap
import usb

try:
from importlib_resources import files # <= 3.8
except:
from importlib.resources import files # >= 3.9
from importlib.resources import files

from cynthion import shared
from fwup.dfu import DFUTarget
Expand Down
13 changes: 4 additions & 9 deletions cynthion/python/src/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@
import glob
import tomli

from collections import namedtuple
try:
# <= 3.8
from importlib_resources import files
except:
# >= 3.9
from importlib.resources import files
from os import path
from pathlib import Path
from collections import namedtuple
from importlib.resources import files
from os import path
from pathlib import Path


SHARED_TOML_PATH = Path(files("cynthion").joinpath("shared"))
Expand Down

0 comments on commit 88b83f2

Please sign in to comment.