Skip to content

Commit

Permalink
Changes as suggested in code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Oct 12, 2020
1 parent e799064 commit c34116b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
9 changes: 1 addition & 8 deletions src/zope/dublincore/browser/metadataedit.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@
from zope.i18nmessageid import MessageFactory

_ = MessageFactory('zope')

try:
unicode
except NameError:
unicode = str # PY3


text_type = type(u'') #PY3
text_type = type(u'') # PY3


class MetaDataEdit(object):
Expand Down
2 changes: 0 additions & 2 deletions src/zope/dublincore/dcsv.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
unicode
except NameError:
basestring = str # PY3
else:
basestring = str, unicode # noqa: F821


def encode(items):
Expand Down
2 changes: 1 addition & 1 deletion src/zope/dublincore/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class IDCPublishing(Interface):

effective = Datetime(
title=u'Effective Date',
description=u"The date and time that an object should be published. "
description=u"The date and time that an object should be published."
)

expires = Datetime(
Expand Down
5 changes: 3 additions & 2 deletions src/zope/dublincore/tests/test_dcsv.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Test the Dublib Core Structured Value support functions.
"""Test the Dublin Core Structured Value support functions.
"""
from doctest import DocTestSuite
from zope.dublincore.dcsv import encode, decode # noqa: F401
# Imports needed inside the doctests:
from zope.dublincore.dcsv import encode, decode


# TODO still need tests for errors, and createMapping()
Expand Down
6 changes: 4 additions & 2 deletions src/zope/dublincore/tests/test_zcml.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
""" Tests that ZCML can be loaded.
"""
import unittest
import zope.component.testing


class ZCMLTests(unittest.TestCase):
from zope.component.testing import setUp # noqa: F401
from zope.component.testing import tearDown # noqa: F401

setUp = zope.component.testing.setUp
tearDown = zope.component.testing.tearDown

def test_loadable(self):
# N.B.: this test deliberately avoids any "ftesting" / layers
Expand Down

0 comments on commit c34116b

Please sign in to comment.