summaryrefslogtreecommitdiff
path: root/poezio/user.py
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-11-14 12:13:03 +0000
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-11-14 12:13:03 +0000
commitbd7b52988c99ef34fd49f52c8a9d335941144450 (patch)
tree2616f8245dc94433eb3a14e4b5b18f34b61c3030 /poezio/user.py
parent395435c68dc656641e7bdb53da88773482dd55b5 (diff)
downloadpoezio-bd7b52988c99ef34fd49f52c8a9d335941144450.tar.gz
poezio-bd7b52988c99ef34fd49f52c8a9d335941144450.tar.bz2
poezio-bd7b52988c99ef34fd49f52c8a9d335941144450.tar.xz
poezio-bd7b52988c99ef34fd49f52c8a9d335941144450.zip
yapf -ir
Diffstat (limited to 'poezio/user.py')
-rw-r--r--poezio/user.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/poezio/user.py b/poezio/user.py
index 40d042f8..c69d241c 100644
--- a/poezio/user.py
+++ b/poezio/user.py
@@ -56,13 +56,13 @@ class User(object):
if theme.ccg_palette:
# use XEP-0392 CCG
fg_color = colors.ccg_text_to_color(
- theme.ccg_palette,
- self.jid.bare if self.jid and self.jid.bare else self.nick
- )
+ theme.ccg_palette, self.jid.bare
+ if self.jid and self.jid.bare else self.nick)
self.color = fg_color, -1
else:
mod = len(theme.LIST_COLOR_NICKNAMES)
- nick_pos = int(md5(self.nick.encode('utf-8')).hexdigest(), 16) % mod
+ nick_pos = int(md5(self.nick.encode('utf-8')).hexdigest(),
+ 16) % mod
self.color = theme.LIST_COLOR_NICKNAMES[nick_pos]
def update(self, affiliation, show, status, role):