From 3ce81da7effda29b5dee1909e3eb9ad1b66eed5d Mon Sep 17 00:00:00 2001 From: Adhitya Logan Date: Fri, 31 May 2024 11:45:38 -0700 Subject: [PATCH] fix isort and flake8 errors --- bin/generate_fake_data.py | 6 +++--- dashboard/src/t5gweb/t5gweb.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/generate_fake_data.py b/bin/generate_fake_data.py index e6a0e8f..24a41db 100644 --- a/bin/generate_fake_data.py +++ b/bin/generate_fake_data.py @@ -1,7 +1,7 @@ -import datetime -import re import argparse +import datetime import json +import re from faker import Faker @@ -132,7 +132,7 @@ def generate_fake_private_keywords(fake): option = fake.random_element([1, 2, 3]) if option == 1: - return [fake.word(), f"Telco:Priority-{fake.random_int(1,4)}"] + return [fake.word(), f"Telco:Priority-{fake.random_int(1, 4)}"] elif option == 2: return [fake.word(), fake.word()] else: diff --git a/dashboard/src/t5gweb/t5gweb.py b/dashboard/src/t5gweb/t5gweb.py index 594565f..5691cbd 100644 --- a/dashboard/src/t5gweb/t5gweb.py +++ b/dashboard/src/t5gweb/t5gweb.py @@ -2,14 +2,14 @@ import json import logging +import os import re from copy import deepcopy from datetime import date, datetime, timezone -import os import click from flask.cli import with_appcontext -from t5gweb.utils import set_cfg, get_fake_data +from t5gweb.utils import get_fake_data, set_cfg from . import cache, libtelco5g @@ -127,7 +127,7 @@ def organize_cards(detailed_cards, account_list): @click.command("init-cache") @with_appcontext def init_cache(): - """Initialize cache with real data if it's empty, or fake data if specified by user""" + """Initialize cache with real data, or fake data if set by user in an env var""" # Anything except for 'true' will be set to False fake_data = os.getenv("fake_data", "false") == "true" if not fake_data: