Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
zariiii9003 committed Oct 19, 2023
1 parent 0b809b4 commit cf7dc17
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/pycanape/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import re
import winreg
from ctypes.util import find_library
from enum import Enum
from enum import IntEnum
from pathlib import Path
from typing import List, Optional

Expand All @@ -16,14 +16,14 @@
LOG = logging.getLogger(__name__)


class CANapeVersion(Enum):
CANAPE_17 = "17"
CANAPE_18 = "18"
CANAPE_19 = "19"
CANAPE_20 = "20"
CANAPE_21 = "21"
CANAPE_22 = "22"
CANAPE_23 = "23"
class CANapeVersion(IntEnum):
CANAPE_17 = 17
CANAPE_18 = 18
CANAPE_19 = 19
CANAPE_20 = 20
CANAPE_21 = 21
CANAPE_22 = 22
CANAPE_23 = 23


class CANapeError(Exception):
Expand Down Expand Up @@ -62,7 +62,7 @@ def get_canape_versions() -> List[CANapeVersion]:
continue
try:
version_number = re.sub(pattern=r"Path", repl="", string=name)
versions.append(CANapeVersion(version_number[:2]))
versions.append(CANapeVersion(int(version_number[:2])))
except ValueError:
continue
return versions
Expand Down Expand Up @@ -122,7 +122,7 @@ def get_canape_dll_path(version: Optional[CANapeVersion] = None) -> Path:
if dll_path.exists():
return dll_path

# try ti find dll via PATH environment variable
# try to find dll via PATH environment variable
if dll_path_string := find_library(dll_name):
return Path(dll_path_string)

Expand Down

0 comments on commit cf7dc17

Please sign in to comment.