mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-23 19:19:53 +00:00
More PEP8 compliance cleanups.
Cleaned up the atom entry stanza.
This commit is contained in:
parent
cbe76c8a70
commit
c294c1a85c
5 changed files with 28 additions and 13 deletions
|
@ -6,6 +6,7 @@
|
|||
See the file LICENSE for copying permission.
|
||||
"""
|
||||
|
||||
|
||||
class XMPPError(Exception):
|
||||
|
||||
"""
|
||||
|
|
|
@ -1,11 +1,26 @@
|
|||
from .. xmlstream.stanzabase import registerStanzaPlugin, ElementBase, ET, JID
|
||||
from xml.etree import cElementTree as ET
|
||||
"""
|
||||
SleekXMPP: The Sleek XMPP Library
|
||||
Copyright (C) 2010 Nathanael C. Fritz
|
||||
This file is part of SleekXMPP.
|
||||
|
||||
See the file LICENSE for copying permission.
|
||||
"""
|
||||
|
||||
from sleekxmpp.xmlstream import ElementBase
|
||||
|
||||
|
||||
class AtomEntry(ElementBase):
|
||||
namespace = 'http://www.w3.org/2005/Atom'
|
||||
name = 'entry'
|
||||
plugin_attrib = 'entry'
|
||||
interfaces = set(('title', 'summary'))
|
||||
sub_interfaces = set(('title', 'summary'))
|
||||
plugin_attrib_map = {}
|
||||
plugin_tag_map = {}
|
||||
|
||||
"""
|
||||
A simple Atom feed entry.
|
||||
|
||||
Stanza Interface:
|
||||
title -- The title of the Atom feed entry.
|
||||
summary -- The summary of the Atom feed entry.
|
||||
"""
|
||||
|
||||
namespace = 'http://www.w3.org/2005/Atom'
|
||||
name = 'entry'
|
||||
plugin_attrib = 'entry'
|
||||
interfaces = set(('title', 'summary'))
|
||||
sub_interfaces = set(('title', 'summary'))
|
||||
|
|
|
@ -14,6 +14,6 @@ from sleekxmpp.xmlstream.tostring import tostring
|
|||
from sleekxmpp.xmlstream.xmlstream import XMLStream, RESPONSE_TIMEOUT
|
||||
from sleekxmpp.xmlstream.xmlstream import RestartStream
|
||||
|
||||
__all__ = ['JID', 'Scheduler', 'StanzaBase', 'ElementBase',
|
||||
'ET', 'StateMachine', 'tostring', 'XMLStream',
|
||||
__all__ = ['JID', 'Scheduler', 'StanzaBase', 'ElementBase',
|
||||
'ET', 'StateMachine', 'tostring', 'XMLStream',
|
||||
'RESPONSE_TIMEOUT', 'RestartStream']
|
||||
|
|
|
@ -12,5 +12,5 @@ from sleekxmpp.xmlstream.matcher.stanzapath import StanzaPath
|
|||
from sleekxmpp.xmlstream.matcher.xmlmask import MatchXMLMask
|
||||
from sleekxmpp.xmlstream.matcher.xpath import MatchXPath
|
||||
|
||||
__all__ = ['MatcherId', 'MatchMany', 'StanzaPath',
|
||||
__all__ = ['MatcherId', 'MatchMany', 'StanzaPath',
|
||||
'MatchXMLMask', 'MatchXPath']
|
||||
|
|
|
@ -588,7 +588,6 @@ class ElementBase(object):
|
|||
if isinstance(xpath, str):
|
||||
xpath = self._fix_ns(xpath, split=True, propagate_ns=False)
|
||||
|
||||
|
||||
# Extract the tag name and attribute checks for the first XPath node.
|
||||
components = xpath[0].split('@')
|
||||
tag = components[0]
|
||||
|
|
Loading…
Reference in a new issue