Skip to content

Commit 13f099c

Browse files
committed
fix os and arch enum typing issues
1 parent 3ec1d55 commit 13f099c

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

src/pysonar_scanner/jre.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ def from_string(path: str) -> "JREResolvedPath":
5454

5555

5656
class JREProvisioner:
57-
def __init__(self, api: SonarQubeApi, cache: Cache, sonar_scanner_os: str, sonar_scanner_arch: str):
57+
def __init__(
58+
self, api: SonarQubeApi, cache: Cache, sonar_scanner_os: utils.OsStr, sonar_scanner_arch: utils.ArchStr
59+
):
5860
self.api = api
5961
self.cache = cache
6062
self.sonar_scanner_os = sonar_scanner_os

src/pysonar_scanner/utils.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ def calculate_checksum(filehandle: typing.BinaryIO) -> str:
3939

4040

4141
class Os(Enum):
42-
WINDOWS: OsStr = "windows"
43-
LINUX: OsStr = "linux"
44-
MACOS: OsStr = "mac"
45-
ALPINE: OsStr = "alpine"
46-
OTHER: OsStr = "other"
42+
WINDOWS = "windows"
43+
LINUX = "linux"
44+
MACOS = "mac"
45+
ALPINE = "alpine"
46+
OTHER = "other"
4747

4848

4949
def get_os() -> Os:
@@ -73,9 +73,9 @@ def is_alpine() -> bool:
7373

7474

7575
class Arch(Enum):
76-
X64: ArchStr = "x64"
77-
AARCH64: ArchStr = "aarch64"
78-
OTHER: ArchStr = "other"
76+
X64 = "x64"
77+
AARCH64 = "aarch64"
78+
OTHER = "other"
7979

8080

8181
def get_arch() -> Arch:

0 commit comments

Comments
 (0)