Skip to content
Permalink
Browse files

pep8, cleanup

  • Loading branch information...
nicfit committed Jun 6, 2019
1 parent bde989a commit bdfe08c7edd6c6b723f597383eba81ad8fbf9a39
@@ -1,25 +1,7 @@
# -*- coding: utf-8 -*-
################################################################################
# Copyright (C) 2012 Travis Shirk <travis@pobox.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
################################################################################
'''
"""
Here lies Apple frames, all of which are non-standard. All of these would have
been standard user text frames by anyone not being a bastard, on purpose.
'''
"""
from .frames import Frame, TextFrame

PCST_FID = b"PCST"
@@ -30,8 +12,7 @@


class PCST(Frame):
'''Indicates a podcast. The 4 bytes of data is undefined, and is typically
all 0.'''
"""Indicates a podcast. The 4 bytes of data is undefined, and is typically all 0."""

def __init__(self, id=PCST_FID):
super(PCST, self).__init__(PCST_FID)
@@ -42,28 +23,28 @@ def render(self):


class TKWD(TextFrame):
'''Podcast keywords.'''
"""Podcast keywords."""

def __init__(self, id=TKWD_FID):
super(TKWD, self).__init__(TKWD_FID)


class TDES(TextFrame):
'''Podcast description. One encoding byte followed by text per encoding.'''
"""Podcast description. One encoding byte followed by text per encoding."""

def __init__(self, id=TDES_FID):
super(TDES, self).__init__(TDES_FID)


class TGID(TextFrame):
'''Podcast URL of the audio file. This should be a W frame!'''
"""Podcast URL of the audio file. This should be a W frame!"""

def __init__(self, id=TGID_FID):
super(TGID, self).__init__(TGID_FID)


class WFED(TextFrame):
'''Another podcast URL, the feed URL it is said.'''
"""Another podcast URL, the feed URL it is said."""

def __init__(self, id=WFED_FID, url=""):
super(WFED, self).__init__(WFED_FID, url)
@@ -53,11 +53,12 @@ def rev_version(self):
return self._version[2]

def parse(self, f):
'''Parse an ID3 v2 header starting at the current position of ``f``.
If a header is parsed ``True`` is returned, otherwise ``False``. If
a header is found but malformed an ``eyed3.id3.tag.TagException`` is
"""Parse an ID3 v2 header starting at the current position of `f`.
If a header is parsed `True` is returned, otherwise `False`. If
a header is found but malformed an `eyed3.id3.tag.TagException` is
thrown.
'''
"""
from .tag import TagException

self.clear()
@@ -1,21 +1,3 @@
# -*- coding: utf-8 -*-
################################################################################
# Copyright (C) 2007-2012 Travis Shirk <travis@pobox.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
################################################################################
import os
import string
import shutil
@@ -1,21 +1,3 @@
# -*- coding: utf-8 -*-
################################################################################
# Copyright (C) 2002-2015 Travis Shirk <travis@pobox.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
################################################################################
from __future__ import print_function
import os
import re
@@ -1,21 +1,3 @@
# -*- coding: utf-8 -*-
################################################################################
# Copyright (C) 2014 Travis Shirk <travis@pobox.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
################################################################################
from os.path import basename, splitext
from fnmatch import fnmatch
from ..id3.frames import ImageFrame
@@ -1,21 +1,3 @@
# -*- coding: utf-8 -*-
################################################################################
# Copyright (C) 2002-2015 Travis Shirk <travis@pobox.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
################################################################################
import logging
from ..__about__ import __version__ as VERSION

@@ -2,17 +2,17 @@
from .console import Fore as fg

DISABLE_PROMPT = None
'''Whenever a prompt occurs and this value is not ``None`` it can be ``exit``
"""Whenever a prompt occurs and this value is not ``None`` it can be ``exit``
to call sys.exit (see EXIT_STATUS) or ``raise`` to throw a RuntimeError,
which can be caught if desired.'''
which can be caught if desired."""

EXIT_STATUS = 2

BOOL_TRUE_RESPONSES = ("yes", "y", "true")


class PromptExit(RuntimeError):
'''Raised when ``DISABLE_PROMPT`` is 'raise' and ``prompt`` is called.'''
"""Raised when ``DISABLE_PROMPT`` is 'raise' and ``prompt`` is called."""
pass


@@ -27,12 +27,12 @@ def parseIntList(resp):

def prompt(msg, default=None, required=True, type_=str,
validate=None, choices=None):
'''Prompt user for imput, the prequest is in ``msg``. If ``default`` is
"""Prompt user for imput, the prequest is in ``msg``. If ``default`` is
not ``None`` it will be displayed as the default and returned if not
input is entered. The value ``None`` is only returned if ``required`` is
``False``. The response is passed to ``type_`` for conversion (default
is unicode) before being returned. An optional list of valid responses can
be provided in ``choices``.'''
be provided in ``choices``."""
yes_no_prompt = default is True or default is False

if yes_no_prompt:

0 comments on commit bdfe08c

Please sign in to comment.
You can’t perform that action at this time.