From 0af72376a10cbf71b2b6183a8afcff464cae59b9 Mon Sep 17 00:00:00 2001 From: Midgard Date: Wed, 11 Sep 2019 16:01:49 +0200 Subject: [PATCH] Increase line length limit to 100 Up from 80. --- .pylintrc | 2 +- app/app.py | 2 +- app/database/create_database.py | 8 ++++---- app/models/__init__.py | 6 +++--- app/views/order.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.pylintrc b/.pylintrc index cf85192..1f6b81c 100644 --- a/.pylintrc +++ b/.pylintrc @@ -375,7 +375,7 @@ indent-after-paren=4 indent-string=' ' # Maximum number of characters on a single line. -max-line-length=80 +max-line-length=100 # Maximum number of lines in a module. max-module-lines=1000 diff --git a/app/app.py b/app/app.py index c3e7ab7..3273dd0 100644 --- a/app/app.py +++ b/app/app.py @@ -58,7 +58,7 @@ def register_plugins(app: Flask) -> Manager: airbrake = Airbrake(project_id=app.config["AIRBRAKE_ID"], api_key=app.config["AIRBRAKE_KEY"]) # ugly hack to make this work for out errbit - airbrake._api_url = "http://errbit.awesomepeople.tv/api/v3/projects/{}/notices".format( # pylint: disable=C0301,W0212 + airbrake._api_url = "http://errbit.awesomepeople.tv/api/v3/projects/{}/notices".format( # pylint: disable=W0212 airbrake.project_id ) diff --git a/app/database/create_database.py b/app/database/create_database.py index 128af81..46ea197 100644 --- a/app/database/create_database.py +++ b/app/database/create_database.py @@ -39,9 +39,9 @@ def add_all() -> None: def recreate_from_scratch() -> None: "Recreate a completely new database" - confirmation = "Are you very very sure? (Will delete previous entries!) (y/N) " # pylint: disable=C0301 + confirmation = "Are you very very sure? (Will delete previous entries!) (y/N) " check = "I acknowledge any repercussions!" - if input(confirmation) in yes and input("Type: '{}' ".format(check)) == check: # pylint: disable=C0301 + if input(confirmation) in yes and input("Type: '{}' ".format(check)) == check: print("Resetting the database!") db.drop_all() db.create_all() @@ -58,14 +58,14 @@ def add_to_current() -> None: ).rstrip(", ") while input("Do you still want to add something? (Y/n) ") not in no: - print("What do you want to add? (Use numbers, or A for all, or C for cancel) ") # pylint: disable=C0301 + print("What do you want to add? (Use numbers, or A for all, or C for cancel) ") answer = input("Available: {} : ".format(add_numbers())) if answer == "A": add_all() available = [] elif answer == "C": pass - elif answer.isnumeric() and answer in [str(x) for x in range(len(available))]: # pylint: disable=C0301 + elif answer.isnumeric() and answer in [str(x) for x in range(len(available))]: answer_index = int(answer) print("Adding {}.".format(available[answer_index])) entry_sets[str(available[answer_index])]() diff --git a/app/models/__init__.py b/app/models/__init__.py index 4fcaf0a..210c8d3 100644 --- a/app/models/__init__.py +++ b/app/models/__init__.py @@ -1,7 +1,7 @@ "The base file for everything related to the models" -# pylint: disable=C0301 -# This file will expose what we want from the models module -# This will probably be everything. But putting the imports here makes it possible to import all models in one line like this: +# This file will expose what we want from the models module. +# This will probably be everything. But putting the imports here makes it possible to import all +# models in one line like this: # # from models import User, Item, ... # diff --git a/app/views/order.py b/app/views/order.py index ad0cae9..f96e848 100644 --- a/app/views/order.py +++ b/app/views/order.py @@ -147,7 +147,7 @@ def item_paid(order_id: int, item_id: int) -> typing.Optional[Response]: @order_bp.route("///user_paid", methods=["POST"]) @login_required # pylint: disable=R1710 -def items_user_paid(order_id: int, user_name: str) -> typing.Optional[Response]: # pylint:disable=C0301 +def items_user_paid(order_id: int, user_name: str) -> typing.Optional[Response]: "Indicate payment status for a user in an order" user = User.query.filter(User.username == user_name).first() items: typing.List[OrderItem] = []