Skip to content

Commit

Permalink
Fix pylint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
1kastner committed Sep 9, 2023
1 parent f27ccd6 commit ea26a22
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import typing
import time

from unicodedata import name

from conflowgen.application.models.random_seed_store import RandomSeedStore


Expand All @@ -27,13 +25,11 @@ def get_random_seed(self, seed_name: str, log_loading_process: bool = False) ->
random_seed_store.save()
if log_loading_process:
self.logger.debug(f"Overwrite seed {previous_seed} with {random_seed} for '{seed_name}'")
return random_seed
else:
# there is a previous seed and we should re-use it
random_seed = random_seed_store.random_seed
if log_loading_process:
self.logger.debug(f"Re-use seed {random_seed} for '{seed_name}'")
return random_seed
else:
# there is no previous seed available, enter the current seed and return its value
random_seed = self._get_random_seed()
Expand All @@ -44,7 +40,7 @@ def get_random_seed(self, seed_name: str, log_loading_process: bool = False) ->
)
if log_loading_process:
self.logger.debug(f"Randomly set seed {random_seed} for '{seed_name}'")
return random_seed
return random_seed

@staticmethod
def _get_random_seed() -> int:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import time
import unittest

import pytest

from conflowgen.application.models.random_seed_store import RandomSeedStore
from conflowgen.application.repositories.random_seed_store_repository import RandomSeedStoreRepository
from conflowgen.tests.substitute_peewee_database import setup_sqlite_in_memory_db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from conflowgen.application.models.random_seed_store import RandomSeedStore
from conflowgen.tools.distribution_approximator import DistributionApproximator, SamplerExhaustedException
from substitute_peewee_database import setup_sqlite_in_memory_db
from conflowgen.tests.substitute_peewee_database import setup_sqlite_in_memory_db


class TestDistributionApproximator(unittest.TestCase):
Expand Down

0 comments on commit ea26a22

Please sign in to comment.