diff --git a/conflowgen/tests/domain_models/factories/test_container_factory__create_for_large_scheduled_vehicle.py b/conflowgen/tests/domain_models/factories/test_container_factory__create_for_large_scheduled_vehicle.py index f80e2c44..63c13354 100644 --- a/conflowgen/tests/domain_models/factories/test_container_factory__create_for_large_scheduled_vehicle.py +++ b/conflowgen/tests/domain_models/factories/test_container_factory__create_for_large_scheduled_vehicle.py @@ -111,7 +111,7 @@ def test_create_containers_for_single_deep_sea_vessel_during_ramp_up_period(self # noinspection PyTypeChecker containers = self.container_factory.create_containers_for_large_scheduled_vehicle(vessel) - container_volume = sum([c.occupied_teu for c in containers]) + container_volume = sum(c.occupied_teu for c in containers) self.assertGreater(container_volume, 2900, "A bit less than 3000 is acceptable but common!") self.assertLess(container_volume, 3100, "A bit more than 3000 is acceptable but common!") @@ -144,7 +144,7 @@ def test_create_containers_for_single_deep_sea_vessel_during_ramp_down_period(se # noinspection PyTypeChecker containers = self.container_factory.create_containers_for_large_scheduled_vehicle(vessel) - container_volume_in_teu = sum([c.occupied_teu for c in containers]) + container_volume_in_teu = sum(c.occupied_teu for c in containers) self.assertGreater(container_volume_in_teu, 500, "A bit less than 600 is acceptable but common!") self.assertLess(container_volume_in_teu, 700, "A bit more than 600 is acceptable but common!") diff --git a/examples/Python_Script/demo_DEHAM_CTA.py b/examples/Python_Script/demo_DEHAM_CTA.py index e804c370..0e52dcdc 100644 --- a/examples/Python_Script/demo_DEHAM_CTA.py +++ b/examples/Python_Script/demo_DEHAM_CTA.py @@ -24,8 +24,8 @@ import os.path import random import sys -import pandas as pd import subprocess +import pandas as pd try: import conflowgen @@ -324,8 +324,8 @@ database_chooser.close_current_connection() logger.info(f"ConFlowGen {conflowgen.__version__} from {conflowgen.__file__} was used.") try: - last_git_commit = str(subprocess.check_output(["git", "log", "-1"]).strip()) + last_git_commit = str(subprocess.check_output(["git", "log", "-1"]).strip()) # pylint: disable=B607 logger.info("Used git commit: " + last_git_commit[2:-1]) -except: +except: # pylint: disable=bare-except logger.debug("The last git commit of this repository could not be retrieved, no further version specification.") logger.info("Demo 'demo_DEHAM_CTA' finished successfully.") diff --git a/examples/Python_Script/demo_DEHAM_CTA__with_ramp_up_and_ramp_down_period.py b/examples/Python_Script/demo_DEHAM_CTA__with_ramp_up_and_ramp_down_period.py index ec65c0a4..838bb2ed 100644 --- a/examples/Python_Script/demo_DEHAM_CTA__with_ramp_up_and_ramp_down_period.py +++ b/examples/Python_Script/demo_DEHAM_CTA__with_ramp_up_and_ramp_down_period.py @@ -24,8 +24,8 @@ import os.path import random import sys -import pandas as pd import subprocess +import pandas as pd try: import conflowgen @@ -328,8 +328,8 @@ database_chooser.close_current_connection() logger.info(f"ConFlowGen {conflowgen.__version__} from {conflowgen.__file__} was used.") try: - last_git_commit = str(subprocess.check_output(["git", "log", "-1"]).strip()) + last_git_commit = str(subprocess.check_output(["git", "log", "-1"]).strip()) # pylint: disable=B607 logger.info("Used git commit: " + last_git_commit[2:-1]) -except: +except: # pylint: disable=bare-except logger.debug("The last git commit of this repository could not be retrieved, no further version specification.") logger.info("Demo 'demo_DEHAM_CTA_with_ramp_up_and_down_period' finished successfully.") diff --git a/examples/Python_Script/demo_continental_gateway.py b/examples/Python_Script/demo_continental_gateway.py index a8e8e8cb..70d33e5f 100644 --- a/examples/Python_Script/demo_continental_gateway.py +++ b/examples/Python_Script/demo_continental_gateway.py @@ -7,8 +7,8 @@ import os.path import random import sys -import pandas as pd import subprocess +import pandas as pd try: import conflowgen @@ -198,8 +198,8 @@ logger.info(f"ConFlowGen {conflowgen.__version__} from {conflowgen.__file__} was used.") try: - last_git_commit = str(subprocess.check_output(["git", "log", "-1"]).strip()) + last_git_commit = str(subprocess.check_output(["git", "log", "-1"]).strip()) # pylint: disable=B607 logger.info("Used git commit: " + last_git_commit[2:-1]) -except: +except: # pylint: disable=bare-except logger.debug("The last git commit of this repository could not be retrieved, no further version specification.") logger.info("Demo 'demo_continental_gateway' finished successfully.") diff --git a/examples/Python_Script/demo_poc.py b/examples/Python_Script/demo_poc.py index bc4f7e5b..90adeaec 100644 --- a/examples/Python_Script/demo_poc.py +++ b/examples/Python_Script/demo_poc.py @@ -12,7 +12,8 @@ """ import datetime -import os +import os.path +import random import sys import subprocess @@ -140,8 +141,8 @@ database_chooser.close_current_connection() logger.info(f"ConFlowGen {conflowgen.__version__} from {conflowgen.__file__} was used.") try: - last_git_commit = str(subprocess.check_output(["git", "log", "-1"]).strip()) + last_git_commit = str(subprocess.check_output(["git", "log", "-1"]).strip()) # pylint: disable=B607 logger.info("Used git commit: " + last_git_commit[2:-1]) -except: +except: # pylint: disable=bare-except logger.debug("The last git commit of this repository could not be retrieved, skip this.") logger.info("Demo 'demo_poc' finished successfully.")