Skip to content

Commit

Permalink
utf 8 headers, import sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
thet committed Jan 9, 2018
1 parent 829e8eb commit 282c1e3
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 34 deletions.
8 changes: 2 additions & 6 deletions plone/__init__.py
@@ -1,6 +1,2 @@
# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
# -*- coding: utf-8 -*-
__import__('pkg_resources').declare_namespace(__name__)
2 changes: 1 addition & 1 deletion plone/uuid/__init__.py
@@ -1 +1 @@
# -*- extra stuff goes here -*-
# -*- coding: utf-8 -*-
6 changes: 3 additions & 3 deletions plone/uuid/adapter.py
@@ -1,7 +1,7 @@
from zope import interface
from zope import component

# -*- coding: utf-8 -*-
from plone.uuid import interfaces
from zope import component
from zope import interface


@interface.implementer(interfaces.IUUID)
Expand Down
5 changes: 4 additions & 1 deletion plone/uuid/browser.py
@@ -1,7 +1,10 @@
from zope.publisher.browser import BrowserView
# -*- coding: utf-8 -*-
from plone.uuid.interfaces import IUUID
from zope.publisher.browser import BrowserView

import sys


if sys.version_info >= (3,):
text_type = str
else:
Expand Down
30 changes: 15 additions & 15 deletions plone/uuid/configure.zcml
Expand Up @@ -5,23 +5,23 @@
xmlns:i18n="http://namespaces.zope.org/i18n"
i18n_domain="plone.uuid">

<include package="zope.component" file="meta.zcml" />
<include package="zope.component" />
<include package="zope.component" file="meta.zcml" />
<include package="zope.component" />

<!-- Make sure we test the Zope 2 version of view registrations in Zope 2 -->
<include zcml:condition="installed Products.Five" package="Products.Five.browser" file="meta.zcml" />
<include zcml:condition="not-installed Products.Five" package="zope.browserpage" file="meta.zcml" />
<!-- Make sure we test the Zope 2 version of view registrations in Zope 2 -->
<include zcml:condition="installed Products.Five" package="Products.Five.browser" file="meta.zcml" />
<include zcml:condition="not-installed Products.Five" package="zope.browserpage" file="meta.zcml" />

<adapter factory=".adapter.attributeUUID" />
<adapter factory=".adapter.MutableAttributeUUID" />
<utility factory=".generator.UUID4Generator" />
<subscriber handler=".handlers.addAttributeUUID" />
<adapter factory=".adapter.attributeUUID" />
<adapter factory=".adapter.MutableAttributeUUID" />
<utility factory=".generator.UUID4Generator" />
<subscriber handler=".handlers.addAttributeUUID" />

<browser:view
name="uuid"
class=".browser.UUIDView"
for=".interfaces.IUUIDAware"
permission="zope.Public"
/>
<browser:view
name="uuid"
class=".browser.UUIDView"
for=".interfaces.IUUIDAware"
permission="zope.Public"
/>

</configure>
1 change: 1 addition & 0 deletions plone/uuid/generator.py
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from plone.uuid.interfaces import IUUIDGenerator
from zope.deprecation import deprecate
from zope.interface import implementer
Expand Down
11 changes: 5 additions & 6 deletions plone/uuid/handlers.py
@@ -1,13 +1,12 @@
# -*- coding: utf-8 -*-
from plone.uuid.interfaces import ATTRIBUTE_NAME
from plone.uuid.interfaces import IAttributeUUID
from plone.uuid.interfaces import IUUIDGenerator
from zope.component import adapter
from zope.component import queryUtility

from zope.lifecycleevent.interfaces import IObjectCreatedEvent
from zope.lifecycleevent.interfaces import IObjectCopiedEvent
from zope.lifecycleevent.interfaces import IObjectCreatedEvent

from plone.uuid.interfaces import IUUIDGenerator
from plone.uuid.interfaces import IAttributeUUID

from plone.uuid.interfaces import ATTRIBUTE_NAME

try:
from Acquisition import aq_base
Expand Down
2 changes: 2 additions & 0 deletions plone/uuid/interfaces.py
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
from zope.interface import Interface


ATTRIBUTE_NAME = '_plone.uuid'


Expand Down
4 changes: 3 additions & 1 deletion plone/uuid/tests.py
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
import sys
import unittest

import sys

if sys.version_info >= (3,):
text_type = str
else:
Expand Down
5 changes: 4 additions & 1 deletion setup.py
@@ -1,4 +1,7 @@
from setuptools import setup, find_packages
# -*- coding: utf-8 -*-
from setuptools import find_packages
from setuptools import setup


version = '1.0.5.dev0'

Expand Down

0 comments on commit 282c1e3

Please sign in to comment.