From deab24e916ddaf3d20d132a8625d7a13337664a3 Mon Sep 17 00:00:00 2001 From: Michael H Date: Fri, 10 Jan 2020 06:43:35 -0500 Subject: [PATCH] 3.2.2 (#3324) * page sizing changes * docs --- docs/changelog_3_2_0.rst | 14 ++++++++++++++ docs/venv_guide.rst | 6 +++--- redbot/__init__.py | 2 +- redbot/core/commands/help.py | 14 +++++++------- tox.ini | 1 - 5 files changed, 25 insertions(+), 12 deletions(-) diff --git a/docs/changelog_3_2_0.rst b/docs/changelog_3_2_0.rst index b179d4d20..04d69d6f6 100644 --- a/docs/changelog_3_2_0.rst +++ b/docs/changelog_3_2_0.rst @@ -1,5 +1,19 @@ .. 3.2.x Changelogs +Redbot 3.2.2 (2020-01-10) +========================= + +Hotfixes +-------- + +- Fix Help Pagination issue + +Docs +---- + +- Correct venv docs + + Redbot 3.2.1 (2020-01-10) ========================= diff --git a/docs/venv_guide.rst b/docs/venv_guide.rst index 59cb97398..1aa34b93d 100644 --- a/docs/venv_guide.rst +++ b/docs/venv_guide.rst @@ -38,7 +38,7 @@ to keep it in a location which is easy to type out the path to. From now, we'll ~~~~~~~~~~~~~~~~~~~~~~~~ Create your virtual environment with the following command:: - python3.7 -m venv redenv + python3.8 -m venv redenv And activate it with the following command:: @@ -56,7 +56,7 @@ Continue reading `below `. ~~~~~~~~~~~~~~~~~~~ Create your virtual environment with the following command:: - py -3.7 -m venv redenv + py -3.8 -m venv redenv And activate it with the following command:: @@ -82,7 +82,7 @@ Using ``pyenv virtualenv`` Using ``pyenv virtualenv`` saves you the headache of remembering where you installed your virtual environments. If you haven't already, install pyenv with `pyenv-installer`_. -First, ensure your pyenv interpreter is set to python 3.7.0 or greater with the following command:: +First, ensure your pyenv interpreter is set to python 3.8.1 or greater with the following command:: pyenv version diff --git a/redbot/__init__.py b/redbot/__init__.py index 33cbfc918..09fc0cd1a 100644 --- a/redbot/__init__.py +++ b/redbot/__init__.py @@ -193,7 +193,7 @@ def _update_event_loop_policy(): _asyncio.set_event_loop_policy(_uvloop.EventLoopPolicy()) -__version__ = "3.2.2.dev1" +__version__ = "3.2.2" version_info = VersionInfo.from_str(__version__) # Filter fuzzywuzzy slow sequence matcher warning diff --git a/redbot/core/commands/help.py b/redbot/core/commands/help.py index 8204c7d8f..5d1a5eb9a 100644 --- a/redbot/core/commands/help.py +++ b/redbot/core/commands/help.py @@ -223,7 +223,7 @@ class RedHelpFormatter: shorten_line(f"**{name}** {command.short_doc}") for name, command in sorted(subcommands.items()) ) - for i, page in enumerate(pagify(subtext, page_length=1000, shorten_by=0)): + for i, page in enumerate(pagify(subtext, page_length=500, shorten_by=0)): if i == 0: title = "**__Subcommands:__**" else: @@ -281,12 +281,12 @@ class RedHelpFormatter: f_len = len(f.value) + len(f.name) # Commands start at the 1st index of fields, i < 2 is a hacky workaround for now - if not current_count or f_len + current_count > max_chars or i < 2: + if not current_count or f_len + current_count < max_chars or i < 2: current_count += f_len curr_group.append(f) elif curr_group: ret.append(curr_group) - current_count = 0 + current_count = f_len curr_group = [f] else: if curr_group: @@ -299,7 +299,7 @@ class RedHelpFormatter: pages = [] page_char_limit = await ctx.bot._config.help.page_char_limit() - page_char_limit = min(page_char_limit, 5990) # Just in case someone was manually... + page_char_limit = min(page_char_limit, 5500) # Just in case someone was manually... author_info = {"name": f"{ctx.me.display_name} Help Menu", "icon_url": ctx.me.avatar_url} @@ -318,13 +318,13 @@ class RedHelpFormatter: # We could consider changing this to always just subtract the offset, # But based on when this is being handled (very end of 3.2 release) # I'd rather not stick a major visual behavior change in at the last moment. - if page_char_limit + offset > 5990: + if page_char_limit + offset > 5500: # This is still neccessary with the max interaction above # While we could subtract 100% of the time the offset from page_char_limit # the intent here is to shorten again # *only* when neccessary, by the exact neccessary amount # To retain a visual match with prior behavior. - page_char_limit = 5990 - offset + page_char_limit = 5500 - offset elif page_char_limit < 250: # Prevents an edge case where a combination of long cog help and low limit # Could prevent anything from ever showing up. @@ -393,7 +393,7 @@ class RedHelpFormatter: shorten_line(f"**{name}** {command.short_doc}") for name, command in sorted(coms.items()) ) - for i, page in enumerate(pagify(command_text, page_length=1000, shorten_by=0)): + for i, page in enumerate(pagify(command_text, page_length=500, shorten_by=0)): if i == 0: title = "**__Commands:__**" else: diff --git a/tox.ini b/tox.ini index b550ed356..d532c4727 100644 --- a/tox.ini +++ b/tox.ini @@ -52,7 +52,6 @@ basepython = python3.8 extras = docs commands = sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out/html" -W -bhtml - sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out/linkcheck" -W -blinkcheck sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out/doctest" -W -bdoctest [testenv:style]