original_docstring: Verify that every track has the required tag fields.
docstring: Verify that every track has the required tag fields.
docstring_tokens: Verify that every track has the required tag fields .
code: def check_required_tags(tags):
      """Verify that every track has the required tag fields."""
      offending_files = []
      for fln, tags in tags.items():
          for t in ["title", "artist", "album", "tracknumber"]:
              missing = []
              if not getattr(tags, t, False):
                  missing.add(t)
              if missing:
                  offending_files.append(f'{fln} ({", ".join(missing)})')
  
      if offending_files:
          click.secho(
              "The following files do not contain all the required tags: {}.".format(
                  ", ".join(offending_files)
              ),
              fg="red",
          )
      else:
          click.secho("Verified that all files contain the required tags.", fg="green")
code_tokens: def check_required_tags ( tags ) : offending_files = [ ] for fln , tags in tags . items ( ) : for t in [ "title" , "artist" , "album" , "tracknumber" ] : missing = [ ] if not getattr ( tags , t , False ) : missing . add ( t ) if missing : offending_files . append ( f'{fln} ({", ".join(missing)})' ) if offending_files : click . secho ( "The following files do not contain all the required tags: {}." . format ( ", " . join ( offending_files ) ) , fg = "red" , ) else : click . secho ( "Verified that all files contain the required tags." , fg = "green" )
short_docstring: Verify that every track has the required tag fields.
short_docstring_tokens: Verify that every track has the required tag fields .
comment: """Verify that every track has the required tag fields."""