Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
fix: debugf
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-roys committed Sep 2, 2022
1 parent b86b660 commit 24ca8ee
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions snyk_sync/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from datetime import timedelta
from os import environ
from pathlib import Path
from pprint import pformat
from pprint import pprint
from typing import Any
from typing import Dict
Expand Down Expand Up @@ -33,11 +34,11 @@
from utils import jopen
from utils import jwrite
from utils import load_watchlist
from utils import logger
from utils import set_log_level
from utils import update_client
from utils import yopen
from utils import set_log_level
from utils import logger
from pprint import pformat


app = typer.Typer(add_completion=False)

Expand Down Expand Up @@ -170,7 +171,7 @@ def main(
envvar="SNYK_SYNC_LOG_LEVEL",
callback=settings_callback,
),
set_root_log_level: bool = typer.Option(
set_root_log_level: bool = typer.Option(
default=False,
help="Sets the log level defined in the `log-level` attribute across all modules / packages",
envvar="SNYK_SYNC_SET_ROOT_LOG_LEVEL",
Expand All @@ -187,7 +188,6 @@ def main(

s = Settings.parse_obj(ctx.params)


if ctx.invoked_subcommand is None:
typer.echo("Snyk Sync invoked with no subcommand, executing all", err=True)
if status() is False:
Expand Down Expand Up @@ -308,7 +308,7 @@ def sync(
logger.debug(f"forks(len):{len(forks)}")

if s.forks is True and len(forks) > 0:
logger.debugf(f"processing {len(forks)} forks")
logger.debug(f"processing {len(forks)} forks")
typer.echo(f"Scanning {len(forks)} forks for import.yaml", err=True)

with typer.progressbar(forks, label="Scanning: ") as forks_progress:
Expand Down Expand Up @@ -488,7 +488,7 @@ def targets(
for branch in r.get_reimport(s.default_org, s.snyk_orgs):
logger.debug(f"processing branch={pformat(branch)}")
if branch.project_count() == 0 or force_refresh:

if force_default:
org_id = s.snyk_orgs[s.default_org]["orgId"]
int_id = s.snyk_orgs[s.default_org]["integrations"]["github-enterprise"]
Expand All @@ -509,7 +509,7 @@ def targets(

target_list.append(target)

final_targets = list()
final_targets: List = list()
logger.debug(f"final_targets={pformat(final_targets)}")

for group in s.snyk_groups:
Expand Down Expand Up @@ -716,6 +716,7 @@ def autoconf(

logger.debug(f"snyk_orgs={pformat(snyk_orgs)}")


def load_conf():

global s
Expand Down

0 comments on commit 24ca8ee

Please sign in to comment.