Skip to content

Commit

Permalink
PEP-8.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Feb 6, 2020
1 parent 14b1a57 commit 9f76546
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 24 deletions.
18 changes: 8 additions & 10 deletions setup.py
Expand Up @@ -18,7 +18,7 @@


def read(*rnames):
with open(os.path.join(os.path.dirname(__file__), *rnames)) as f:
with open(os.path.join(os.path.dirname(__file__), *rnames)) as f:
return f.read()


Expand All @@ -43,25 +43,23 @@ def read(*rnames):
'zope.testrunner',
'zope.publisher']),
packages=find_packages('src'),
package_dir= {'':'src'},

package_dir={'': 'src'},
namespace_packages=['zc'],
package_data = {
'': ['*.txt', '*.rst', '*.zcml', '*.gif', '*.js'],
'zc.table':['resources/*', '*.pt'],
package_data={
'': ['*.txt', '*.rst', '*.zcml', '*.gif', '*.js'],
'zc.table': ['resources/*', '*.pt'],
},

author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
description="Zope table",
long_description=(
read('README.rst')
+ '\n\n' +
read('CHANGES.rst')
),
),
license='ZPL 2.1',
keywords="zope zope3",
classifiers = [
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
Expand All @@ -80,4 +78,4 @@ def read(*rnames):
'Programming Language :: Python :: 3.8',
],
zip_safe=False,
)
)
16 changes: 8 additions & 8 deletions src/zc/table/interfaces.py
Expand Up @@ -30,12 +30,12 @@ class IColumn(interface.Interface):
u'configuration. Must be unique within any set of '
u'columns passed to a table formatter.'),
constraint=pythonLikeNameConstraint,
)
)

title = schema.TextLine(
title=u'Title',
description=u'The title of the column, used in configuration dialogs.',
)
)

def renderHeader(formatter):
"""Renders a table header.
Expand Down Expand Up @@ -123,7 +123,7 @@ class IFormatter(interface.Interface):
request = schema.Field(
title=u'Request',
description=u'The request object.',
)
)

context = schema.Field(
title=u'Context',
Expand All @@ -144,33 +144,33 @@ class IFormatter(interface.Interface):
'sorting. The names of all columns must be unique within the '
'sequence.',
unique=True,
)
)

visible_columns = schema.Tuple(
title=u'The visible columns that make up this table.',
description=u'The columns to display when rendering this table.',
unique=True,
)
)

batch_size = schema.Int(
title=u'Number of rows per page',
description=u'The number of rows to show at a time. '
u'Set to 0 for no batching.',
default=20,
min=0,
)
)

batch_start = schema.Int(
title=u'Batch Start',
description=u'The starting index for batching.',
default=0,
)
)

prefix = schema.BytesLine(
title=u'Prefix',
description=u'The prefix for all form names',
constraint=pythonLikeNameConstraint,
)
)

columns_by_name = schema.Dict(
title=u'Columns by Name',
Expand Down
12 changes: 6 additions & 6 deletions src/zc/table/tests.py
Expand Up @@ -88,8 +88,8 @@ def output_difference(self, example, got, optionflags):
example, got, optionflags)


DOCTEST_FLAGS = (doctest.NORMALIZE_WHITESPACE|
doctest.ELLIPSIS|
DOCTEST_FLAGS = (doctest.NORMALIZE_WHITESPACE |
doctest.ELLIPSIS |
doctest.IGNORE_EXCEPTION_DETAIL)


Expand All @@ -105,11 +105,11 @@ def test_suite():
setUp=columnSetUp, tearDown=tearDown,
optionflags=DOCTEST_FLAGS,
checker=Py23OutputChecker(),
),
),
doctest.DocFileSuite(
'fieldcolumn.rst',
setUp=fieldColumnSetUp, tearDown=tearDown,
optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
checker=Py23OutputChecker(),
),
))
),
))

0 comments on commit 9f76546

Please sign in to comment.