Page MenuHomePhabricator

bot_choice fill format of question and choices counts also color directives
Closed, ResolvedPublic

Description

Steps to reproduce

  1. Run pwb.py category tidy

Expected behavior

Choice for page /dev/random: (u<number> [0-3], <number> [0-23], save page
to [C]ategory Počítače, [r]emove the category from page, [s]kip page, show
[m]ore context, [j]ump to custom category, [q]uit): q

Current behavior
After https://gerrit.wikimedia.org/r/#/c/pywikibot/core/+/428927/:

Choice for page /dev/random: (u<number> [0-3],
<number> [0-23], save page to [C]ategory Počítače,
[r]emove the category from page, [s]kip page, show [m]ore context, [j]ump to
custom category, [q]uit): q

Configuration
Python 3.6.5, Pywikibot last commit from master

Details

Event Timeline

Xqt triaged this task as Low priority.

The problem comes from text highlighting inside the Options which is also counted by the textwrap.fill method . The bare text is

Choice for page ♥{lightpurple}Hydraulik♥{default}: u<number> [0-2], <number> [0-5], save page to [C]ategory ♥{lightpurple}Hydraulik ♥{default}, [r]emove the category from page, [s]kip page, show [m]ore context, [j]ump to custom category, [q]uit

Change 439609 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] remove color highlights before fill function

https://gerrit.wikimedia.org/r/439609

New behaviour after the patch:

Choice for page Hydraulik: (u<number> [0-2], <number> [0-5], save page to
[C]ategory Hydraulik, [r]emove the category from page, [s]kip page, show
[m]ore context, [j]ump to custom category, [q]uit): q
• Vvjjkkii renamed this task from bot_choice fill format of question and choices counts also color directives to labaaaaaaa.Jul 1 2018, 1:05 AM
• Vvjjkkii removed Xqt as the assignee of this task.
• Vvjjkkii raised the priority of this task from Low to High.
• Vvjjkkii updated the task description. (Show Details)
• Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from labaaaaaaa to bot_choice fill format of question and choices counts also color directives.Jul 2 2018, 9:46 AM
CommunityTechBot assigned this task to Xqt.
CommunityTechBot lowered the priority of this task from High to Low.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.

Change 439609 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] remove color highlights before fill function

https://gerrit.wikimedia.org/r/439609