Skip to content

Commit

Permalink
Merge pull request #221 from 0x41424142/actions/black
Browse files Browse the repository at this point in the history
Format Python code with psf/black push
  • Loading branch information
0x41424142 authored Dec 16, 2024
2 parents 20dd381 + 4a6c199 commit e57d39e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 17 deletions.
9 changes: 6 additions & 3 deletions qualysdk/pm/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,24 @@ def get_assets(
def lookup_host_uuids(
auth: TokenAuth,
assetIds: list[str | int],
) -> BaseList[tuple[str, str]]: ...
) -> BaseList[tuple[str, str]]:
...


@overload
def lookup_host_uuids(
auth: TokenAuth,
assetIds: BaseList[str | int],
) -> BaseList[tuple[str, str]]: ...
) -> BaseList[tuple[str, str]]:
...


@overload
def lookup_host_uuids(
auth: TokenAuth,
assetIds: str | int,
) -> tuple[str, str]: ...
) -> tuple[str, str]:
...


def lookup_host_uuids(
Expand Down
18 changes: 12 additions & 6 deletions qualysdk/pm/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,16 @@ def list_jobs(

# Overload 1 for str jobId
@overload
def get_job_results(auth: TokenAuth, jobId: str, **kwargs) -> JobResultSummary: ...
def get_job_results(auth: TokenAuth, jobId: str, **kwargs) -> JobResultSummary:
...


# Overload 2 for list/BaseList of PMJob
@overload
def get_job_results(
auth: TokenAuth, jobId: Union[list[PMJob], BaseList[PMJob]], **kwargs
) -> BaseList[JobResultSummary]: ...
) -> BaseList[JobResultSummary]:
...


def get_job_results(
Expand Down Expand Up @@ -577,13 +579,15 @@ def create_job(


@overload
def delete_job(auth: TokenAuth, jobId: str) -> list[dict[str, str]]: ...
def delete_job(auth: TokenAuth, jobId: str) -> list[dict[str, str]]:
...


@overload
def delete_job(
auth: TokenAuth, jobId: Union[list[str], BaseList[str]]
) -> list[dict[str, str]]: ...
) -> list[dict[str, str]]:
...


def delete_job(
Expand Down Expand Up @@ -625,15 +629,17 @@ def delete_job(
@overload
def change_job_status(
auth: TokenAuth, action: Literal["Enabled", "Disabled"], jobId: str
) -> dict: ...
) -> dict:
...


@overload
def change_job_status(
auth: TokenAuth,
action: Literal["Enabled", "Disabled"],
jobId: Union[list[str], BaseList[str]],
) -> dict: ...
) -> dict:
...


def change_job_status(
Expand Down
18 changes: 12 additions & 6 deletions qualysdk/pm/patchcatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def get_patch_catalog(
patchId: Union[int, str],
platform: Literal["windows", "linux"] = "windows",
**kwargs,
) -> BaseList[CatalogPatch]: ...
) -> BaseList[CatalogPatch]:
...


@overload
Expand All @@ -30,7 +31,8 @@ def get_patch_catalog(
patchId: Union[BaseList[str, int], list[str, int]],
platform: Literal["windows", "linux"] = "windows",
**kwargs,
) -> BaseList[CatalogPatch]: ...
) -> BaseList[CatalogPatch]:
...


def get_patch_catalog(
Expand Down Expand Up @@ -249,7 +251,8 @@ def validate_threads_and_patches(patchId, threads):
@overload
def get_packages_in_linux_patch(
auth: TokenAuth, patchId: str, threads: int = 5, **kwargs
) -> BaseList[PackageDetail]: ...
) -> BaseList[PackageDetail]:
...


@overload
Expand All @@ -258,7 +261,8 @@ def get_packages_in_linux_patch(
patchId: Union[BaseList[str], list[str]],
threads: int = 5,
**kwargs,
) -> BaseList[PackageDetail]: ...
) -> BaseList[PackageDetail]:
...


def get_packages_in_linux_patch(
Expand Down Expand Up @@ -322,15 +326,17 @@ def get_products_in_windows_patch(
auth: TokenAuth,
patchId: str,
threads: int = 5,
) -> BaseList[AssociatedProduct]: ...
) -> BaseList[AssociatedProduct]:
...


@overload
def get_products_in_windows_patch(
auth: TokenAuth,
patchId: Union[BaseList[str], list[str]],
threads: int = 5,
) -> BaseList[AssociatedProduct]: ...
) -> BaseList[AssociatedProduct]:
...


def get_products_in_windows_patch(
Expand Down
6 changes: 4 additions & 2 deletions qualysdk/pm/vulnerabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ def _thread_worker(
@overload
def lookup_cves(
auth: TokenAuth, qids: list[Union[str, int]], threads: int = 5
) -> BaseList[PMVulnerability]: ...
) -> BaseList[PMVulnerability]:
...


@overload
def lookup_cves(
auth: TokenAuth, qids: Union[str, int], threads: int = 5
) -> BaseList[PMVulnerability]: ...
) -> BaseList[PMVulnerability]:
...


def lookup_cves(
Expand Down

0 comments on commit e57d39e

Please sign in to comment.