mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-26 12:04:07 +01:00
Fediverse and Poll: Run Black
This commit is contained in:
parent
feaa02ab6d
commit
8326d6ef7f
@ -100,7 +100,7 @@ class NetworkedFediverseTestCase(BaseFediverseTestCase):
|
|||||||
|
|
||||||
|
|
||||||
class NetworklessFediverseTestCase(BaseFediverseTestCase):
|
class NetworklessFediverseTestCase(BaseFediverseTestCase):
|
||||||
timeout = 1.
|
timeout = 1.0
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def mockWebfingerSupport(self, value):
|
def mockWebfingerSupport(self, value):
|
||||||
|
@ -133,14 +133,17 @@ class Poll_(callbacks.Plugin):
|
|||||||
|
|
||||||
answers = [(answer.split()[0], answer) for answer in answers]
|
answers = [(answer.split()[0], answer) for answer in answers]
|
||||||
|
|
||||||
answer_id_counts = collections.Counter(id_ for (id_, _) in answers).items()
|
answer_id_counts = collections.Counter(
|
||||||
|
id_ for (id_, _) in answers
|
||||||
|
).items()
|
||||||
duplicate_answer_ids = [
|
duplicate_answer_ids = [
|
||||||
answer_id for (answer_id, count) in answer_id_counts if count > 1
|
answer_id for (answer_id, count) in answer_id_counts if count > 1
|
||||||
]
|
]
|
||||||
if duplicate_answer_ids:
|
if duplicate_answer_ids:
|
||||||
irc.error(
|
irc.error(
|
||||||
format(
|
format(
|
||||||
_("Duplicate answer identifier(s): %L"), duplicate_answer_ids
|
_("Duplicate answer identifier(s): %L"),
|
||||||
|
duplicate_answer_ids,
|
||||||
),
|
),
|
||||||
Raise=True,
|
Raise=True,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user