Skip to content

Commit

Permalink
Fix qodana issues
Browse files Browse the repository at this point in the history
  • Loading branch information
1kastner committed Aug 20, 2024
1 parent 2578422 commit 9a8fe70
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion conflowgen/analyses/abstract_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def _restrict_container_picked_up_by_vehicle_type(
if container_picked_up_by_vehicle_type == "scheduled vehicles":
container_picked_up_by_vehicle_type = ModeOfTransport.get_scheduled_vehicles()
list_of_vehicle_types = container_picked_up_by_vehicle_type
if hashable(container_picked_up_by_vehicle_type) \
elif hashable(container_picked_up_by_vehicle_type) \
and container_picked_up_by_vehicle_type in set(ModeOfTransport):
selected_containers = selected_containers.where(
Container.picked_up_by == container_picked_up_by_vehicle_type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def _convert_table_to_pandas_dataframe(
# extract data from sql database
data = list(model.select().dicts())

if type(model) == ModelSelect: # pylint: disable=unidiomatic-typecheck # TODO: check if isinstance works
if isinstance(model, ModelSelect):
model = model.model

foreign_keys_to_resolve = {}
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
database_names = ["demo_continental_gateway", "demo_deham_cta", "demo_poc"] # List of database names to download
sqlite_databases_directory = "notebooks/data/prepared_dbs/"
os.system("echo 'Current directory:'")
os.system("pwd") # Print current directory; we expect to be in the docs folder
os.system("pwd") # Print current directory; we expect to be in the docs folder
os.makedirs(sqlite_databases_directory, exist_ok=True) # Create the destination folder if it doesn't exist
for database_name in database_names:
os.system(f'echo "Fetching {database_name}"')
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
'parameterized', # for parameterized testing
'seaborn', # some visuals in unittests are generated by seaborn
'nbconvert', # used to run tests in Jupyter notebooks, see ./test/notebooks/test_run_notebooks.py
'nbformat', # used to run tests in Jupyter notebooks

# build documentation
'sphinx >=6.2', # build the documentation - restrict version to improve pip version resolution
Expand Down

0 comments on commit 9a8fe70

Please sign in to comment.