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 Apr 15, 2024
1 parent e42a4d3 commit 641b3c0
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 35 deletions.
1 change: 1 addition & 0 deletions config/public_urls.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""goldengoose URL Configuration
"""

from django.conf import settings
from django.conf.urls import include
from django.contrib import admin
Expand Down
3 changes: 2 additions & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Base settings to build other settings files upon.
"""

import os
from decimal import ROUND_HALF_EVEN
from pathlib import Path
Expand Down Expand Up @@ -332,7 +333,7 @@
)

# Currency Formatter will output 2.000,00 Bs.
_FORMATTER.add_sign_definition("default", EEI, prefix=u"Ƶ ")
_FORMATTER.add_sign_definition("default", EEI, prefix="Ƶ ")

_FORMATTER.add_formatting_definition(
"es_BO",
Expand Down
1 change: 1 addition & 0 deletions config/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
middleware here, or combine a Django application with an application of another
framework.
"""

import os
import sys
from pathlib import Path
Expand Down
6 changes: 3 additions & 3 deletions goosetools/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def core_home(request):
return HttpResponseRedirect(reverse("core:splash"))
context = {}
if not settings.SINGLE_TENANT:
context[
"share_url"
] = f"{settings.BASE_URL}{settings.TENANT_SUBFOLDER_PREFIX}/{request.tenant.name}/"
context["share_url"] = (
f"{settings.BASE_URL}{settings.TENANT_SUBFOLDER_PREFIX}/{request.tenant.name}/"
)

return render(request, "core/home.html", context)

Expand Down
2 changes: 1 addition & 1 deletion goosetools/industry/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def shiporders_contract_confirm(request, pk):

def random_with_n_digits(n):
range_start = 10 ** (n - 1)
range_end = (10 ** n) - 1
range_end = (10**n) - 1
return randint(range_start, range_end)


Expand Down
6 changes: 3 additions & 3 deletions goosetools/items/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ def approve(self, approved_by):
item = Item(
name=self.name,
item_type=self.item_type,
eve_echoes_market_id=self.eve_echoes_market_id
if self.eve_echoes_market_id
else None,
eve_echoes_market_id=(
self.eve_echoes_market_id if self.eve_echoes_market_id else None
),
)
item.full_clean()
item.save()
Expand Down
8 changes: 5 additions & 3 deletions goosetools/market/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,11 @@ def sell_all_items(request, pk):
"pricelist": pricelist,
"loc": loc,
"title": "Change Price of An Existing Market Order",
"from_date": (timezone.now() - timezone.timedelta(hours=hours)).date()
if hours is not None
else None,
"from_date": (
(timezone.now() - timezone.timedelta(hours=hours)).date()
if hours is not None
else None
),
},
)

Expand Down
34 changes: 19 additions & 15 deletions goosetools/ownership/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,12 +440,16 @@ def loot_group_edit(request, pk):
"anom_level": fleet_anom.anom_type.level,
"anom_faction": fleet_anom.anom_type.faction,
"anom_type": fleet_anom.anom_type.type,
"repeat_start_time": fleet_anom.next_repeat.time()
if fleet_anom.minute_repeat_period
else None,
"repeat_start_date": fleet_anom.next_repeat.date()
if fleet_anom.minute_repeat_period
else None,
"repeat_start_time": (
fleet_anom.next_repeat.time()
if fleet_anom.minute_repeat_period
else None
),
"repeat_start_date": (
fleet_anom.next_repeat.date()
if fleet_anom.minute_repeat_period
else None
),
"minute_repeat_period": fleet_anom.minute_repeat_period,
}
)
Expand Down Expand Up @@ -531,9 +535,9 @@ def fleet_shares(request, pk):
items.append(
{
"username": user.discord_username(),
"fleet_id": loot_group.fleet_anom.fleet.id
if loot_group.fleet_anom
else False,
"fleet_id": (
loot_group.fleet_anom.fleet.id if loot_group.fleet_anom else False
),
"loot_bucket": loot_group.bucket.id,
"loot_group_id": loot_group.id,
"your_shares": estimated_participation["participation"][user.id][
Expand Down Expand Up @@ -909,9 +913,9 @@ def valid_transfer(to_transfer, request, form):
def transfer_profit(request):
if request.method == "POST":
form = TransferProfitForm(request.POST)
form.fields[
"character_to_send_contracts_to"
].queryset = request.gooseuser.characters()
form.fields["character_to_send_contracts_to"].queryset = (
request.gooseuser.characters()
)
form.fields["transfer_method"].queryset = filter_controlled_qs_to_usable(
TransferMethod.objects.all(), request, return_as_qs=True
)
Expand Down Expand Up @@ -943,9 +947,9 @@ def transfer_profit(request):
form.fields["transfer_method"].queryset = filter_controlled_qs_to_usable(
TransferMethod.objects.all(), request, return_as_qs=True
)
form.fields[
"character_to_send_contracts_to"
].queryset = request.gooseuser.characters()
form.fields["character_to_send_contracts_to"].queryset = (
request.gooseuser.characters()
)
return render(
request,
"ownership/transfer_profit.html",
Expand Down
6 changes: 3 additions & 3 deletions goosetools/users/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def __init__(self, *args, **kwargs):
else:
self.fields["ingame_name"].required = False
self.fields["existing_character"].required = False
self.fields[
"ingame_name"
].help_text = "Only fill this in if you don't want to apply with one of the existing characters above. This should be the EXACT IN GAME name of the character. Once approved you will be able to auth alts under Settings->Characters."
self.fields["ingame_name"].help_text = (
"Only fill this in if you don't want to apply with one of the existing characters above. This should be the EXACT IN GAME name of the character. Once approved you will be able to auth alts under Settings->Characters."
)


class SettingsForm(forms.Form):
Expand Down
14 changes: 8 additions & 6 deletions goosetools/users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,9 @@ def groups_view(request):
"member_count": g.groupmember_set.count(),
"description": g.description,
"manually_given": g.manually_given,
"required_discord_role": g.required_discord_role.name
if g.required_discord_role
else None,
"required_discord_role": (
g.required_discord_role.name if g.required_discord_role else None
),
"editable": g.editable,
"permissions": ", ".join(g.permissions()),
}
Expand Down Expand Up @@ -850,9 +850,11 @@ def corps_list(request):
"name_with_ticker": c.name_with_corp_tag(),
"member_count": c.character_set.count(),
"manual_group_given_on_approval": c.manual_group_given_on_approval,
"discord_role_given_on_approval": c.discord_role_given_on_approval.name
if c.discord_role_given_on_approval
else None,
"discord_role_given_on_approval": (
c.discord_role_given_on_approval.name
if c.discord_role_given_on_approval
else None
),
"discord_roles_allowing_application": c.discord_roles_allowing_application.all().values_list(
"name", flat=True
),
Expand Down

0 comments on commit 641b3c0

Please sign in to comment.