From 2b97f7050370af4e83bef09acd227fa4fe3a9a76 Mon Sep 17 00:00:00 2001 From: "(PC) Refisio" Date: Sat, 9 Feb 2019 22:31:05 -0500 Subject: Updated Rules cog. Also, accidentally changed the max-line-length in the linter to 100 so that I could properly lint my code without having Pycharm yell at me. Reverted that change, as the main repo still hasn't moved to that style yet. --- bot/cogs/rules.py | 12 +++++++----- tox.ini | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bot/cogs/rules.py b/bot/cogs/rules.py index 666f7b1b6..0e0c5699a 100644 --- a/bot/cogs/rules.py +++ b/bot/cogs/rules.py @@ -51,10 +51,11 @@ class Rules: "We do not allow advertisements for communities (including other Discord servers) or " "commercial projects - Contact us directly if you want to discuss a partnership!" ) - self.default_desc = ("The rules and guidelines that apply to this community can be found on" - " our [rules page](https://pythondiscord.com/about/rules). We expect" - " all members of the community to have read and understood these." - ) + self.default_desc = "The rules and guidelines that apply to this " \ + "community can be found on our [rules page]" \ + "(https://pythondiscord.com/about/rules). We " \ + "expect all members of the community to have " \ + "read and understood these." @command(aliases=['r', 'rule'], name='rules') @redirect_output(destination_channel=Channels.bot, bypass_roles=STAFF) @@ -84,7 +85,8 @@ class Rules: continue rule_match = re.search(r'\d?\d[:|-]1?\d', item) if rule_match: - a, b = sorted([int(x)-1 for x in re.split(r'[:-]', rule_match.group())]) + a, b = sorted( + [int(x)-1 for x in re.split(r'[:-]', rule_match.group())]) rules_to_get.extend(range(a, b+1)) else: rules_to_get.append(int(item)-1) diff --git a/tox.ini b/tox.ini index 67f0ffd81..c6fa513f4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [flake8] -max-line-length=100 +max-line-length=120 application_import_names=bot exclude=.cache,.venv ignore=B311,W503,E226,S311 -- cgit v1.2.3