How to use the vermin.arguments.Arguments function in vermin

To help you get started, we’ve selected a few vermin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github netromdk / vermin / vermin / main.py View on Github external
def main():
  config = Config.get()

  args = Arguments(sys.argv[1:]).parse()
  if "usage" in args:
    Arguments.print_usage(args["full"])
    sys.exit(args["code"])

  if args["code"] != 0:
    sys.exit(args["code"])

  processes = args["processes"]
  targets = args["targets"]
  no_tips = args["no-tips"]

  # Detect paths, remove duplicates, and sort for deterministic results.
  vprint("Detecting python files..")
  paths = [abspath(p) for p in args["paths"]]
  paths = list(set(detect_paths(paths, args["hidden"])))
  paths.sort()
github netromdk / vermin / vermin / main.py View on Github external
def main():
  config = Config.get()

  args = Arguments(sys.argv[1:]).parse()
  if "usage" in args:
    Arguments.print_usage(args["full"])
    sys.exit(args["code"])

  if args["code"] != 0:
    sys.exit(args["code"])

  processes = args["processes"]
  targets = args["targets"]
  no_tips = args["no-tips"]

  # Detect paths, remove duplicates, and sort for deterministic results.
  vprint("Detecting python files..")
  paths = [abspath(p) for p in args["paths"]]
  paths = list(set(detect_paths(paths, args["hidden"])))
  paths.sort()

  amount = len(paths)