From 0b0ef12be488b10ad6cf258d913041ea0a5d7c01 Mon Sep 17 00:00:00 2001 From: tyboro2002 Date: Mon, 8 Apr 2024 17:53:29 +0200 Subject: [PATCH] chore: fix linter warnings --- backend/api/management/commands/makeAdmin.py | 2 +- backend/api/seeders/seeder.py | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 backend/api/seeders/seeder.py diff --git a/backend/api/management/commands/makeAdmin.py b/backend/api/management/commands/makeAdmin.py index 0c4b50da..fc24c7fb 100644 --- a/backend/api/management/commands/makeAdmin.py +++ b/backend/api/management/commands/makeAdmin.py @@ -1,8 +1,8 @@ from django.core.management.base import BaseCommand from api.models.student import Student -class Command(BaseCommand): +class Command(BaseCommand): help = 'seed the db with data' diff --git a/backend/api/seeders/seeder.py b/backend/api/seeders/seeder.py deleted file mode 100644 index a24b47bd..00000000 --- a/backend/api/seeders/seeder.py +++ /dev/null @@ -1,19 +0,0 @@ -from faker import Faker - -# first, import a similar Provider or use the default one -from faker.providers import BaseProvider - -from api.models.student import Student - -fake = Faker() - -# create new provider class -class Providers(BaseProvider): - def provide_student(self) -> Student: - return Student() - -# then add new provider to faker instance -fake.add_provider(Providers) - -def printFakeStudent(): - print(fake.provide_student()) \ No newline at end of file