PEP8, lots of tweaks/fixes
This commit is contained in:
parent
641b770dc3
commit
508fec8ae8
29 changed files with 165 additions and 111 deletions
|
@ -1,17 +1,17 @@
|
|||
"""
|
||||
twitter.py: written by Scaevolus 2009, modified by Lukeroge 2012
|
||||
retrieves most recent tweets
|
||||
"""
|
||||
# written by Scaevolus, modified by Lukeroge
|
||||
|
||||
import random
|
||||
import re
|
||||
from time import strptime, strftime
|
||||
from time import strftime
|
||||
from time import strptime
|
||||
from datetime import datetime
|
||||
|
||||
from util import hook, http, timesince
|
||||
from util import hook
|
||||
from util import http
|
||||
from util import timesince
|
||||
|
||||
|
||||
def unescape_xml(string):
|
||||
"""Unescapes XML"""
|
||||
return string.replace('>', '>').replace('<', '<').replace(''',
|
||||
"'").replace('"e;', '"').replace('&', '&')
|
||||
|
||||
|
@ -20,6 +20,7 @@ history_max_size = 250
|
|||
|
||||
|
||||
def parseDateTime(s):
|
||||
"""Parses the date from a string"""
|
||||
if s is None:
|
||||
return None
|
||||
m = re.match(r'(.*?)(?:\.(\d+))?(([-+]\d{1,2}):(\d{2}))?$',
|
||||
|
|
Reference in a new issue