poezio/user: rework change_color to only log when necessary

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
8 jobs for main in 8 minutes and 37 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Lint
failed #30204
allowed to fail
mypyc

00:02:02

failed #30202
allowed to fail
pylint-latest

00:04:40

failed #30203
allowed to fail
pylint-plugins

00:03:36

passed #30201
security-check

00:00:57

 
  Test
passed #30205
pytest-3.7

00:01:05

passed #30206
pytest-latest

00:02:14

 
  Build
passed #30207
www
build-doc

00:01:36

passed #30208
build-ubuntu

00:00:24

 
Name Stage Failure
failed
pylint-latest Lint
poezio/ui/types.py:103:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
poezio/ui/types.py:104:23: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
poezio/ui/types.py:105:29: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
poezio/ui/types.py:108:23: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
poezio/ui/types.py:109:29: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
poezio/ui/types.py:110:22: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
poezio/ui/types.py:112:30: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
poezio/ui/types.py:114:22: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
ERROR: Job failed: exit code 1
failed
mypyc Lint
poezio/plugin_e2ee.py:243: error: Argument 2 to "set_and_save" of "Config" has incompatible type "Optional[str]"; expected "Union[str, int, float, bool]"
poezio/plugin_e2ee.py:270: error: Argument 2 to "isinstance" has incompatible type "Tuple[Union[MucTab, DynamicConversationTab, StaticConversationTab, PrivateTab]]"; expected "Union[type, Tuple[Union[type, Tuple[Any, ...]], ...]]"
poezio/plugin_e2ee.py:329: error: Unexpected keyword argument "passthrough" for "_encrypt" of "E2EEPlugin"
poezio/plugin_e2ee.py:374: error: Item "MucTab" of "Union[MucTab, DynamicConversationTab, StaticConversationTab, PrivateTab]" has no attribute "parent_muc"
poezio/plugin_e2ee.py:374: error: Item "DynamicConversationTab" of "Union[MucTab, DynamicConversationTab, StaticConversationTab, PrivateTab]" has no attribute "parent_muc"
poezio/plugin_e2ee.py:374: error: Item "StaticConversationTab" of "Union[MucTab, DynamicConversationTab, StaticConversationTab, PrivateTab]" has no attribute "parent_muc"
poezio/plugin_e2ee.py:389: note: "_encrypt" of "E2EEPlugin" defined here
poezio/plugin_e2ee.py:499: error: Incompatible return value type (got "Union[str, int, float, bool]", expected "str")
ERROR: Job failed: exit code 1
failed
pylint-plugins Lint
Finished processing dependencies for poezio==0.13.1.dev47
$ pylint -E plugins
************* Module plugins.upload
plugins/upload.py:53:40: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module plugins.lastlog
plugins/lastlog.py:27:18: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module plugins.untrackme
plugins/untrackme.py:17:11: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
ERROR: Job failed: exit code 1