How to use the vermin.printing.nprint 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
sys.exit(1)

  msg = "Analyzing"
  if amount > 1:
    msg += " {} files".format(amount)
  vprint("{} using {} processes..".format(msg, processes))

  try:
    processor = Processor()
    (mins, incomp, unique_versions, backports) = processor.process(paths, processes)
  except KeyboardInterrupt:
    print("Aborting..")
    sys.exit(1)

  if incomp and not config.ignore_incomp():
    nprint("Note: Some files had incompatible versions so the results might not be correct!")

  incomps = []
  reqs = []
  for i in range(len(mins)):
    ver = mins[i]
    if ver is None:
      incomps.append(i + 2)
    elif ver is not None and ver != 0:
      reqs.append(ver)

  if len(reqs) == 0 and len(incomps) == 0:
    print("No known reason found that it will not work with 2+ and 3+.")
    print("Please report if it does not: https://github.com/netromdk/vermin/issues/")
    if config.lax_mode() and not no_tips:
      print("Tip: Try without using lax mode for more thorough analysis.")
github netromdk / vermin / vermin / processor.py View on Github external
def print_incomp(path):
      if not config.ignore_incomp():
        nprint("File with incompatible versions: {}".format(path))