mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +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.
|
See the file LICENSE for copying permission.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class XMPPError(Exception):
|
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):
|
class AtomEntry(ElementBase):
|
||||||
namespace = 'http://www.w3.org/2005/Atom'
|
|
||||||
name = 'entry'
|
"""
|
||||||
plugin_attrib = 'entry'
|
A simple Atom feed entry.
|
||||||
interfaces = set(('title', 'summary'))
|
|
||||||
sub_interfaces = set(('title', 'summary'))
|
Stanza Interface:
|
||||||
plugin_attrib_map = {}
|
title -- The title of the Atom feed entry.
|
||||||
plugin_tag_map = {}
|
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'))
|
||||||
|
|
|
@ -588,7 +588,6 @@ class ElementBase(object):
|
||||||
if isinstance(xpath, str):
|
if isinstance(xpath, str):
|
||||||
xpath = self._fix_ns(xpath, split=True, propagate_ns=False)
|
xpath = self._fix_ns(xpath, split=True, propagate_ns=False)
|
||||||
|
|
||||||
|
|
||||||
# Extract the tag name and attribute checks for the first XPath node.
|
# Extract the tag name and attribute checks for the first XPath node.
|
||||||
components = xpath[0].split('@')
|
components = xpath[0].split('@')
|
||||||
tag = components[0]
|
tag = components[0]
|
||||||
|
|
Loading…
Reference in a new issue