Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed Jul 23, 2024
1 parent 0d0744e commit 3bc48db
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 131 deletions.
3 changes: 1 addition & 2 deletions admin_scripts/calculate_winners.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from collections import defaultdict
from datetime import UTC, datetime
from pathlib import Path
from typing import TypeAlias

# Start time
START_TIME = datetime.strptime("2000-01-01 00:00:00+0000", "%Y-%m-%d %H:%M:%S%z")
Expand All @@ -30,7 +29,7 @@
# Path to hunt event csv taken from the website
CSV_FILE_PATH = r"C:\Users\username\Downloads\hunt.huntevent.csv"

TeamName: TypeAlias = str
type TeamName = str


def parse_timestamp(timestamp: str) -> datetime:
Expand Down
26 changes: 13 additions & 13 deletions azure/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions hunt/third_party/apimixin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Any, TypeAlias
from typing import TYPE_CHECKING, Any

from django.http import Http404
from rest_framework import status
Expand All @@ -12,9 +12,9 @@
from rest_framework.request import Request
from rest_framework.viewsets import GenericViewSet

_Base: TypeAlias = GenericViewSet[Model]
type _Base = GenericViewSet[Model]
else:
_Base: TypeAlias = object
type _Base = object


# https://gist.github.com/tomchristie/a2ace4577eff2c603b1b
Expand Down
4 changes: 2 additions & 2 deletions hunt/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import datetime
import zoneinfo
from functools import wraps
from typing import TYPE_CHECKING, Concatenate, ParamSpec, TypeAlias
from typing import TYPE_CHECKING, Concatenate, ParamSpec

import holidays
from django.db.models import Max
Expand All @@ -23,7 +23,7 @@ class AuthenticatedHttpRequest(HttpRequest):
user: User

P = ParamSpec("P")
AuthenticatedRequestHandler: TypeAlias = Callable[
type AuthenticatedRequestHandler[**P] = Callable[
Concatenate[AuthenticatedHttpRequest, P], HttpResponse
]

Expand Down
Loading

0 comments on commit 3bc48db

Please sign in to comment.