Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 2, 2024
1 parent 7b85568 commit b445498
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion authentication/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def process_exception(self, request, exception):
url = self.get_redirect_uri(request, exception)

if url: # noqa: RET503
url += ("?" in url and "&" or "?") + "message={}&backend={}".format( # noqa: UP032
url += (("?" in url and "&") or "?") + "message={}&backend={}".format( # noqa: UP032
quote(message), backend_name
)
return redirect(url)
2 changes: 1 addition & 1 deletion b2b_ecommerce/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@


@pytest.fixture(autouse=True)
def cybersource_settings(settings): # noqa: PT004
def cybersource_settings(settings):
"""
Set cybersource settings
"""
Expand Down
2 changes: 1 addition & 1 deletion b2b_ecommerce/views_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@


@pytest.fixture(autouse=True)
def ecommerce_settings(settings): # noqa: PT004
def ecommerce_settings(settings):
"""
Set cybersource settings
"""
Expand Down
4 changes: 2 additions & 2 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def pytest_configure(config):


@pytest.fixture(scope="session", autouse=True)
def clean_up_files(): # noqa: PT004
def clean_up_files():
"""
Fixture that removes the media root folder after the suite has finished running,
effectively deleting any files that were created by factories over the course of the test suite.
Expand All @@ -76,7 +76,7 @@ def clean_up_files(): # noqa: PT004


@pytest.fixture(scope="session")
def django_db_setup(django_db_setup, django_db_blocker): # noqa: ARG001, PT004
def django_db_setup(django_db_setup, django_db_blocker): # noqa: ARG001
"""
Creates all the index pages during the tests setup as index pages are required by the factories.
"""
Expand Down
2 changes: 1 addition & 1 deletion ecommerce/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@


@pytest.fixture(autouse=True)
def cybersource_settings(settings): # noqa: PT004
def cybersource_settings(settings):
"""
Set cybersource settings
"""
Expand Down
2 changes: 1 addition & 1 deletion ecommerce/views_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def render_json(serializer):


@pytest.fixture(autouse=True)
def ecommerce_settings(settings): # noqa: PT004
def ecommerce_settings(settings):
"""
Set cybersource settings
"""
Expand Down
2 changes: 1 addition & 1 deletion fixtures/autouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@


@pytest.fixture(autouse=True)
def disable_hubspot_api(settings): # noqa: PT004
def disable_hubspot_api(settings):
"""Disable Hubspot API by default for tests"""
settings.MITOL_HUBSPOT_API_PRIVATE_TOKEN = None
2 changes: 1 addition & 1 deletion fixtures/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def valid_address_dict():


@pytest.fixture
def nplusone_fail(settings): # noqa: PT004
def nplusone_fail(settings):
"""Configures the nplusone app to raise errors"""
settings.NPLUSONE_RAISE = True

Expand Down
2 changes: 1 addition & 1 deletion mail/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


@pytest.fixture
def email_settings(settings): # noqa: PT004
def email_settings(settings):
"""Default settings for email tests"""
settings.MAILGUN_RECIPIENT_OVERRIDE = None

Expand Down
2 changes: 1 addition & 1 deletion sheets/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


@pytest.fixture(autouse=True)
def sheets_settings(settings): # noqa: PT004
def sheets_settings(settings):
"""Default settings for sheets tests"""
settings.FEATURES["COUPON_SHEETS"] = True
settings.SHEETS_REQ_EMAIL_COL = 7
Expand Down
2 changes: 1 addition & 1 deletion sheets/coupon_request_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


@pytest.fixture
def courseware_objects(): # noqa: PT004
def courseware_objects():
"""Database objects that CSV data depends on"""
run = CourseRunFactory.create(courseware_id="course-v1:edX+DemoX+Demo_Course")
ProductVersionFactory.create(product__content_object=run)
Expand Down

0 comments on commit b445498

Please sign in to comment.