Pep 8 work.
This commit is contained in:
parent
c29cc7de06
commit
4b07acc3e8
3 changed files with 26 additions and 24 deletions
|
|
@ -3,7 +3,8 @@
|
||||||
# glymur documentation build configuration file, created by
|
# glymur documentation build configuration file, created by
|
||||||
# sphinx-quickstart on Sun May 26 11:29:54 2013.
|
# sphinx-quickstart on Sun May 26 11:29:54 2013.
|
||||||
#
|
#
|
||||||
# This file is execfile()d with the current directory set to its containing dir.
|
# This file is execfile()d with the current directory set to its containing
|
||||||
|
# dir.
|
||||||
#
|
#
|
||||||
# Note that not all possible configuration values are present in this
|
# Note that not all possible configuration values are present in this
|
||||||
# autogenerated file.
|
# autogenerated file.
|
||||||
|
|
@ -11,7 +12,9 @@
|
||||||
# All configuration values have a default; values that are commented out
|
# All configuration values have a default; values that are commented out
|
||||||
# serve to show the default.
|
# serve to show the default.
|
||||||
|
|
||||||
import sys, os
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
class Mock(object):
|
class Mock(object):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|
@ -41,13 +44,13 @@ for mod_name in MOCK_MODULES:
|
||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
#sys.path.insert(0, os.path.abspath('.'))
|
#sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
|
||||||
# -- General configuration -----------------------------------------------------
|
# -- General configuration ----------------------------------------------------
|
||||||
|
|
||||||
# If your documentation needs a minimal Sphinx version, state it here.
|
# If your documentation needs a minimal Sphinx version, state it here.
|
||||||
#needs_sphinx = '1.0'
|
#needs_sphinx = '1.0'
|
||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',
|
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',
|
||||||
'sphinx.ext.autosummary',
|
'sphinx.ext.autosummary',
|
||||||
'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'numpydoc']
|
'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'numpydoc']
|
||||||
|
|
@ -91,7 +94,8 @@ release = '0.1.3p1'
|
||||||
# directories to ignore when looking for source files.
|
# directories to ignore when looking for source files.
|
||||||
exclude_patterns = []
|
exclude_patterns = []
|
||||||
|
|
||||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
# The reST default role (used for this markup: `text`) to use for all
|
||||||
|
# documents.
|
||||||
#default_role = None
|
#default_role = None
|
||||||
|
|
||||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||||
|
|
@ -112,7 +116,7 @@ pygments_style = 'sphinx'
|
||||||
#modindex_common_prefix = []
|
#modindex_common_prefix = []
|
||||||
|
|
||||||
|
|
||||||
# -- Options for HTML output ---------------------------------------------------
|
# -- Options for HTML output --------------------------------------------------
|
||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
|
|
@ -192,9 +196,8 @@ html_show_sourcelink = True
|
||||||
htmlhelp_basename = 'glymurdoc'
|
htmlhelp_basename = 'glymurdoc'
|
||||||
|
|
||||||
|
|
||||||
# -- Options for LaTeX output --------------------------------------------------
|
# -- Options for LaTeX output -------------------------------------------------
|
||||||
|
|
||||||
latex_elements = {
|
|
||||||
# The paper size ('letterpaper' or 'a4paper').
|
# The paper size ('letterpaper' or 'a4paper').
|
||||||
#'papersize': 'letterpaper',
|
#'papersize': 'letterpaper',
|
||||||
|
|
||||||
|
|
@ -203,14 +206,13 @@ latex_elements = {
|
||||||
|
|
||||||
# Additional stuff for the LaTeX preamble.
|
# Additional stuff for the LaTeX preamble.
|
||||||
#'preamble': '',
|
#'preamble': '',
|
||||||
}
|
latex_elements = {}
|
||||||
|
|
||||||
# Grouping the document tree into LaTeX files. List of tuples
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
# (source start file, target name, title, author, documentclass
|
||||||
latex_documents = [
|
# [howto/manual]).
|
||||||
('index', 'glymur.tex', u'glymur Documentation',
|
latex_documents = [('index', 'glymur.tex', u'glymur Documentation',
|
||||||
u'John Evans', 'manual'),
|
u'John Evans', 'manual'), ]
|
||||||
]
|
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top of
|
# The name of an image file (relative to this directory) to place at the top of
|
||||||
# the title page.
|
# the title page.
|
||||||
|
|
@ -233,7 +235,7 @@ latex_documents = [
|
||||||
#latex_domain_indices = True
|
#latex_domain_indices = True
|
||||||
|
|
||||||
|
|
||||||
# -- Options for manual page output --------------------------------------------
|
# -- Options for manual page output -------------------------------------------
|
||||||
|
|
||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
|
|
@ -246,16 +248,14 @@ man_pages = [
|
||||||
#man_show_urls = False
|
#man_show_urls = False
|
||||||
|
|
||||||
|
|
||||||
# -- Options for Texinfo output ------------------------------------------------
|
# -- Options for Texinfo output -----------------------------------------------
|
||||||
|
|
||||||
# Grouping the document tree into Texinfo files. List of tuples
|
# Grouping the document tree into Texinfo files. List of tuples
|
||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [('index', 'glymur', u'glymur Documentation',
|
||||||
('index', 'glymur', u'glymur Documentation',
|
u'John Evans', 'glymur',
|
||||||
u'John Evans', 'glymur', 'One line description of project.',
|
'One line description of project.', 'Miscellaneous'), ]
|
||||||
'Miscellaneous'),
|
|
||||||
]
|
|
||||||
|
|
||||||
# Documents to append as an appendix to all manuals.
|
# Documents to append as an appendix to all manuals.
|
||||||
#texinfo_appendices = []
|
#texinfo_appendices = []
|
||||||
|
|
|
||||||
|
|
@ -1610,7 +1610,7 @@ class UUIDBox(Jp2kBox):
|
||||||
n = offset + length - f.tell()
|
n = offset + length - f.tell()
|
||||||
buffer = f.read(n)
|
buffer = f.read(n)
|
||||||
if kwargs['uuid'] == uuid.UUID('be7acfcb-97a9-42e8-9c71-999491e3afac'):
|
if kwargs['uuid'] == uuid.UUID('be7acfcb-97a9-42e8-9c71-999491e3afac'):
|
||||||
# XMP data. Parse as XML. Seems to be a difference between
|
# XMP data. Parse as XML. Seems to be a difference between
|
||||||
# ElementTree in version 2.7 and 3.3.
|
# ElementTree in version 2.7 and 3.3.
|
||||||
if sys.hexversion < 0x03000000:
|
if sys.hexversion < 0x03000000:
|
||||||
parser = ET.XMLParser(encoding='utf-8')
|
parser = ET.XMLParser(encoding='utf-8')
|
||||||
|
|
@ -1647,6 +1647,7 @@ _box_with_id = {
|
||||||
'uuid': UUIDBox,
|
'uuid': UUIDBox,
|
||||||
'xml ': XMLBox}
|
'xml ': XMLBox}
|
||||||
|
|
||||||
|
|
||||||
def _indent(elem, level=0):
|
def _indent(elem, level=0):
|
||||||
"""Recipe for pretty printing XML. Please see
|
"""Recipe for pretty printing XML. Please see
|
||||||
|
|
||||||
|
|
@ -1666,6 +1667,7 @@ def _indent(elem, level=0):
|
||||||
if level and (not elem.tail or not elem.tail.strip()):
|
if level and (not elem.tail or not elem.tail.strip()):
|
||||||
elem.tail = i
|
elem.tail = i
|
||||||
|
|
||||||
|
|
||||||
def _pretty_print_xml(xml, level=0):
|
def _pretty_print_xml(xml, level=0):
|
||||||
"""Pretty print XML data.
|
"""Pretty print XML data.
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ class TestSuiteNegative(unittest.TestCase):
|
||||||
ofile.write(data, cbsize=(13, 12))
|
ofile.write(data, cbsize=(13, 12))
|
||||||
|
|
||||||
def test_codeblock_size_with_precinct_size(self):
|
def test_codeblock_size_with_precinct_size(self):
|
||||||
# Seems like code block sizes should never exceed half that of
|
# Seems like code block sizes should never exceed half that of
|
||||||
# precinct size.
|
# precinct size.
|
||||||
ifile = Jp2k(self.jp2file)
|
ifile = Jp2k(self.jp2file)
|
||||||
data = ifile.read(reduce=3)
|
data = ifile.read(reduce=3)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue