From 4891fa08d4aabaf4fac937a988c02c5c586c9841 Mon Sep 17 00:00:00 2001 From: Peter Bittner Date: Thu, 3 Oct 2024 18:17:11 +0200 Subject: [PATCH] Address linter/formatter complaints (code style changes) --- behave_django/pageobject.py | 1 + tests/test_project/settings.py | 6 ------ tests/test_project/urls.py | 4 ++++ tests/test_project/wsgi.py | 6 +----- tests/unit/test_cli.py | 2 +- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/behave_django/pageobject.py b/behave_django/pageobject.py index 4903bec..dad8fce 100644 --- a/behave_django/pageobject.py +++ b/behave_django/pageobject.py @@ -3,6 +3,7 @@ Background reading: https://www.martinfowler.com/bliki/PageObject.html """ + import django.shortcuts from bs4 import BeautifulSoup diff --git a/tests/test_project/settings.py b/tests/test_project/settings.py index 857ee3c..dc21c9f 100644 --- a/tests/test_project/settings.py +++ b/tests/test_project/settings.py @@ -1,11 +1,5 @@ """ Django settings for test_project project. - -For more information on this file, see -https://docs.djangoproject.com/en/stable/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/stable/ref/settings/ """ from pathlib import Path diff --git a/tests/test_project/urls.py b/tests/test_project/urls.py index 18d69aa..b69c00a 100644 --- a/tests/test_project/urls.py +++ b/tests/test_project/urls.py @@ -1,3 +1,7 @@ +""" +URLs config for test_project project. +""" + from django.contrib import admin from django.urls import path from django.views.generic import TemplateView diff --git a/tests/test_project/wsgi.py b/tests/test_project/wsgi.py index 3aafc77..89fb06d 100644 --- a/tests/test_project/wsgi.py +++ b/tests/test_project/wsgi.py @@ -1,11 +1,7 @@ """ WSGI config for test_project project. - -It exposes the WSGI callable as a module-level variable named ``application``. - -For more information on this file, see -https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ + import os from django.core.wsgi import get_wsgi_application diff --git a/tests/unit/test_cli.py b/tests/unit/test_cli.py index b763e15..1b5c102 100644 --- a/tests/unit/test_cli.py +++ b/tests/unit/test_cli.py @@ -177,7 +177,7 @@ def test_simple_and_use_existing_database_flags_raise_a_warning(self): ) def test_runner_and_others_flags_raise_a_warning(self, arguments, expect_error): exit_status, output = run_silently( - 'python tests/manage.py behave %s --tags=@skip-all' % arguments + f'python tests/manage.py behave {arguments} --tags=@skip-all' ) assert exit_status == 0, show_run_error(exit_status, output)