diff options
| author | Karan Jayachandra <mail@karanjayachandra.com> | 2025-07-06 13:31:37 +0200 |
|---|---|---|
| committer | Karan Jayachandra <mail@karanjayachandra.com> | 2025-07-06 13:31:37 +0200 |
| commit | c773faeea93fe5db2eb493c79c0c82f46336493c (patch) | |
| tree | e1669ddfe85f6233673b6b04cb71e4fa1e7fed11 /app/model.py | |
| parent | 0da8dc16fb26e9df5d0efd7c7a463e354d8e00cf (diff) | |
Running application
Diffstat (limited to 'app/model.py')
| -rw-r--r-- | app/model.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/model.py b/app/model.py index 467310b..b2b6470 100644 --- a/app/model.py +++ b/app/model.py @@ -3,12 +3,11 @@ from typing import Tuple from os.path import isfile from pandas import read_csv from dataclasses import dataclass -from importlib.resources import path from random import getrandbits, randint from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine, not_ from names import get_first_name, get_last_name -from match_up.data import ( +from app.data import ( MIN_LEVEL, MAX_LEVEL, PLAYER_PER_COURT, @@ -103,8 +102,7 @@ def _init_random_database(session, player_count: int = 80) -> None: class PlayerList: def __init__(self, csv_location=None) -> None: - with path("match_up", "players.db") as p: - self.db_location = p + self.db_location = "players.db" db_file_found = True if not isfile(self.db_location): db_file_found = False |
