Skip to content

Commit

Permalink
Fix codefactor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
1kastner committed May 26, 2024
1 parent 2544d4f commit e9b0cf2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand Down Expand Up @@ -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!")
6 changes: 3 additions & 3 deletions examples/Python_Script/demo_DEHAM_CTA.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import os.path
import random
import sys
import pandas as pd
import subprocess
import pandas as pd

try:
import conflowgen
Expand Down Expand Up @@ -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

Check notice on line 327 in examples/Python_Script/demo_DEHAM_CTA.py

View check run for this annotation

codefactor.io / CodeFactor

examples/Python_Script/demo_DEHAM_CTA.py#L327

Starting a process with a partial executable path (B607)

Check notice on line 327 in examples/Python_Script/demo_DEHAM_CTA.py

View check run for this annotation

codefactor.io / CodeFactor

examples/Python_Script/demo_DEHAM_CTA.py#L327

Unknown option value for 'disable', expected a valid pylint message and got 'B607' (unknown-option-value)
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.")
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import os.path
import random
import sys
import pandas as pd
import subprocess
import pandas as pd

try:
import conflowgen
Expand Down Expand Up @@ -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

Check notice on line 331 in examples/Python_Script/demo_DEHAM_CTA__with_ramp_up_and_ramp_down_period.py

View check run for this annotation

codefactor.io / CodeFactor

examples/Python_Script/demo_DEHAM_CTA__with_ramp_up_and_ramp_down_period.py#L331

Starting a process with a partial executable path (B607)

Check notice on line 331 in examples/Python_Script/demo_DEHAM_CTA__with_ramp_up_and_ramp_down_period.py

View check run for this annotation

codefactor.io / CodeFactor

examples/Python_Script/demo_DEHAM_CTA__with_ramp_up_and_ramp_down_period.py#L331

Unknown option value for 'disable', expected a valid pylint message and got 'B607' (unknown-option-value)
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.")
6 changes: 3 additions & 3 deletions examples/Python_Script/demo_continental_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import os.path
import random
import sys
import pandas as pd
import subprocess
import pandas as pd

try:
import conflowgen
Expand Down Expand Up @@ -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

Check notice on line 201 in examples/Python_Script/demo_continental_gateway.py

View check run for this annotation

codefactor.io / CodeFactor

examples/Python_Script/demo_continental_gateway.py#L201

Unknown option value for 'disable', expected a valid pylint message and got 'B607' (unknown-option-value)

Check notice on line 201 in examples/Python_Script/demo_continental_gateway.py

View check run for this annotation

codefactor.io / CodeFactor

examples/Python_Script/demo_continental_gateway.py#L201

Starting a process with a partial executable path (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.")
7 changes: 4 additions & 3 deletions examples/Python_Script/demo_poc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"""

import datetime
import os
import os.path
import random

Check notice on line 16 in examples/Python_Script/demo_poc.py

View check run for this annotation

codefactor.io / CodeFactor

examples/Python_Script/demo_poc.py#L16

Unused import random (unused-import)
import sys
import subprocess

Expand Down Expand Up @@ -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

Check notice on line 144 in examples/Python_Script/demo_poc.py

View check run for this annotation

codefactor.io / CodeFactor

examples/Python_Script/demo_poc.py#L144

Starting a process with a partial executable path (B607)

Check notice on line 144 in examples/Python_Script/demo_poc.py

View check run for this annotation

codefactor.io / CodeFactor

examples/Python_Script/demo_poc.py#L144

Unknown option value for 'disable', expected a valid pylint message and got 'B607' (unknown-option-value)
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.")

0 comments on commit e9b0cf2

Please sign in to comment.