Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyzhang01 committed Nov 6, 2023
1 parent 67918f6 commit 4a2453a
Show file tree
Hide file tree
Showing 86 changed files with 246 additions and 167 deletions.
1 change: 0 additions & 1 deletion backend/dining/management/commands/load_venues.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class Command(BaseCommand):
"""

def handle(self, *args, **kwargs):

with open("dining/data/dining_venues.csv") as data:
reader = csv.reader(data)
for i, row in enumerate(reader):
Expand Down
1 change: 0 additions & 1 deletion backend/dining/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
("dining", "0001_initial"),
]
Expand Down
5 changes: 3 additions & 2 deletions backend/dining/migrations/0003_venue_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@


class Migration(migrations.Migration):

dependencies = [
("dining", "0002_diningitem_diningstation_diningmenu"),
]

operations = [
migrations.AddField(
model_name="venue", name="name", field=models.CharField(max_length=255, null=True),
model_name="venue",
name="name",
field=models.CharField(max_length=255, null=True),
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,29 @@


class Migration(migrations.Migration):

dependencies = [
("dining", "0003_venue_name"),
]

operations = [
migrations.RemoveField(model_name="diningtransaction", name="profile",),
migrations.RemoveField(
model_name="diningtransaction",
name="profile",
),
migrations.AlterField(
model_name="diningitem", name="description", field=models.CharField(max_length=1000),
model_name="diningitem",
name="description",
field=models.CharField(max_length=1000),
),
migrations.AlterField(
model_name="diningitem", name="ingredients", field=models.CharField(max_length=1000),
model_name="diningitem",
name="ingredients",
field=models.CharField(max_length=1000),
),
migrations.DeleteModel(
name="DiningBalance",
),
migrations.DeleteModel(
name="DiningTransaction",
),
migrations.DeleteModel(name="DiningBalance",),
migrations.DeleteModel(name="DiningTransaction",),
]
2 changes: 0 additions & 2 deletions backend/dining/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class Preferences(APIView):
permission_classes = [IsAuthenticated]

def get(self, request):

preferences = request.user.profile.dining_preferences

# aggregates venues and puts it in form {"venue_id": x, "count": x}
Expand All @@ -68,7 +67,6 @@ def get(self, request):
)

def post(self, request):

profile = request.user.profile

preferences = profile.dining_preferences
Expand Down
1 change: 0 additions & 1 deletion backend/gsr_booking/api_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ def book_room(self, rid, start, end, user, test=False):
return res_json

def get_reservations(self, user):

reservations = Reservation.objects.filter(
creator=user, end__gte=timezone.localtime(), is_cancelled=False
)
Expand Down
1 change: 0 additions & 1 deletion backend/gsr_booking/management/commands/load_gsrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

class Command(BaseCommand):
def handle(self, *args, **kwargs):

with open("gsr_booking/data/gsr_data.csv") as data:
reader = csv.reader(data)
next(reader)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class Command(BaseCommand):
help = "Sends reminders for the GSR Bookings."

def handle(self, *args, **kwargs):

# iterate through all reservations scheduled for the next 30 minutes
for reservation in Reservation.objects.filter(
is_cancelled=False,
Expand Down
19 changes: 14 additions & 5 deletions backend/gsr_booking/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

initial = True

dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
Expand All @@ -18,7 +17,10 @@ class Migration(migrations.Migration):
(
"id",
models.AutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID",
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=255)),
Expand All @@ -33,15 +35,22 @@ class Migration(migrations.Migration):
(
"id",
models.AutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID",
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("accepted", models.BooleanField(default=False)),
("type", models.CharField(choices=[("A", "Admin"), ("M", "M")], max_length=10),),
(
"type",
models.CharField(choices=[("A", "Admin"), ("M", "M")], max_length=10),
),
(
"group",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="gsr_booking.Group",
on_delete=django.db.models.deletion.CASCADE,
to="gsr_booking.Group",
),
),
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

replaces = [
("gsr_booking", "0001_initial"),
("gsr_booking", "0002_auto_20191208_1251"),
Expand All @@ -34,7 +33,10 @@ class Migration(migrations.Migration):
(
"id",
models.AutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID",
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=255)),
Expand All @@ -49,15 +51,22 @@ class Migration(migrations.Migration):
(
"id",
models.AutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID",
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("accepted", models.BooleanField(default=False)),
("type", models.CharField(choices=[("A", "Admin"), ("M", "M")], max_length=10),),
(
"type",
models.CharField(choices=[("A", "Admin"), ("M", "M")], max_length=10),
),
(
"group",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="gsr_booking.Group",
on_delete=django.db.models.deletion.CASCADE,
to="gsr_booking.Group",
),
),
(
Expand Down Expand Up @@ -104,15 +113,19 @@ class Migration(migrations.Migration):
(
"id",
models.AutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID",
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("full_name", models.CharField(db_index=True, max_length=255)),
("pennkey", models.CharField(db_index=True, max_length=255)),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL,
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
),
),
],
Expand All @@ -123,7 +136,10 @@ class Migration(migrations.Migration):
(
"id",
models.AutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID",
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
Expand All @@ -139,13 +155,17 @@ class Migration(migrations.Migration):
(
"email",
models.CharField(
max_length=255, null=True, unique=True, verbose_name="school email",
max_length=255,
null=True,
unique=True,
verbose_name="school email",
),
),
(
"user",
models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL,
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
),
),
(
Expand Down
1 change: 0 additions & 1 deletion backend/gsr_booking/migrations/0002_auto_20191208_1251.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [("gsr_booking", "0001_initial")]

operations = [
Expand Down
11 changes: 8 additions & 3 deletions backend/gsr_booking/migrations/0002_auto_20210129_1527.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("gsr_booking", "0001_squashed_0011_merge_20200418_2009"),
]

operations = [
migrations.RemoveField(model_name="gsrbookingcredentials", name="email",),
migrations.RemoveField(model_name="gsrbookingcredentials", name="id",),
migrations.RemoveField(
model_name="gsrbookingcredentials",
name="email",
),
migrations.RemoveField(
model_name="gsrbookingcredentials",
name="id",
),
migrations.AlterField(
model_name="gsrbookingcredentials",
name="date_updated",
Expand Down
1 change: 0 additions & 1 deletion backend/gsr_booking/migrations/0003_auto_20191208_2144.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class Migration(migrations.Migration):

dependencies = [("gsr_booking", "0002_auto_20191208_1251")]

operations = [
Expand Down
1 change: 0 additions & 1 deletion backend/gsr_booking/migrations/0003_gsr_gsrbooking.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("gsr_booking", "0002_auto_20210129_1527"),
Expand Down
5 changes: 3 additions & 2 deletions backend/gsr_booking/migrations/0004_alter_gsr_lid.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@


class Migration(migrations.Migration):

dependencies = [
("gsr_booking", "0003_gsr_gsrbooking"),
]

operations = [
migrations.AlterField(
model_name="gsr", name="lid", field=models.CharField(max_length=255),
model_name="gsr",
name="lid",
field=models.CharField(max_length=255),
),
]
1 change: 0 additions & 1 deletion backend/gsr_booking/migrations/0004_auto_20191225_1527.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("gsr_booking", "0003_auto_20191208_2144"),
Expand Down
1 change: 0 additions & 1 deletion backend/gsr_booking/migrations/0005_reservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("gsr_booking", "0004_alter_gsr_lid"),
Expand Down
9 changes: 6 additions & 3 deletions backend/gsr_booking/migrations/0005_usersearchindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("gsr_booking", "0004_auto_20191225_1527"),
Expand All @@ -19,15 +18,19 @@ class Migration(migrations.Migration):
(
"id",
models.AutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID",
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("full_name", models.CharField(db_index=True, max_length=255)),
("pennkey", models.CharField(db_index=True, max_length=255)),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL,
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
),
),
],
Expand Down
1 change: 0 additions & 1 deletion backend/gsr_booking/migrations/0006_auto_20200207_2126.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class Migration(migrations.Migration):

dependencies = [
("gsr_booking", "0005_usersearchindex"),
]
Expand Down
Loading

0 comments on commit 4a2453a

Please sign in to comment.