Skip to content

Commit 70d0cba

Browse files
committed
nosec bandit B105
1 parent 37f07c3 commit 70d0cba

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/mistapi/__api_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _url(self, uri) -> str:
7070
return f"https://{self._cloud_uri}{uri}"
7171

7272
def _log_proxy(self) -> None:
73-
pwd_regex = r":([^:@]*)@"
73+
pwd_regex = r":([^:@]*)@" # nosec bandit B105
7474
if self._session.proxies.get("https"):
7575
logger.info(
7676
f"apirequest:sending request to proxy server {re.sub(pwd_regex, ':*********@', self._session.proxies['https'])}"

src/mistapi/__api_session.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def set_api_token(self, apitoken: str) -> None:
378378

379379
def _get_api_token_data(self, apitoken) -> tuple[str | None, list | None]:
380380
token_privileges = []
381-
token_type = "org"
381+
token_type = "org" # nosec bandit B105
382382
try:
383383
url = f"https://{self._cloud_uri}/api/v1/self"
384384
headers = {"Authorization": "Token " + apitoken}
@@ -416,7 +416,7 @@ def _get_api_token_data(self, apitoken) -> tuple[str | None, list | None]:
416416
return (None, None)
417417

418418
if data_json.get("email"):
419-
token_type = "user"
419+
token_type = "user" # nosec bandit B105
420420

421421
for priv in data_json.get("privileges"):
422422
tmp = {
@@ -571,9 +571,9 @@ def login(self) -> None:
571571

572572
def login_with_return(
573573
self,
574-
apitoken: str = "",
575-
email: str = "",
576-
password: str = "",
574+
apitoken: str | None = None,
575+
email: str | None = None,
576+
password: str | None = None,
577577
two_factor: str | None = None,
578578
) -> dict:
579579
"""

0 commit comments

Comments
 (0)