Skip to content

Commit 183ec33

Browse files
committed
Fix invalid type for environment variable default
1 parent 163b03d commit 183ec33

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

backend/tests/benchmark/test_graphql_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from infrahub.graphql.initialization import prepare_graphql_params
2323
from tests.test_data.dataset04 import load_data
2424

25-
NBR_WARMUP = int(os.getenv("INFRAHUB_BENCHMARK_NBR_WARMUP", 5))
25+
NBR_WARMUP = int(os.getenv("INFRAHUB_BENCHMARK_NBR_WARMUP", "5"))
2626

2727

2828
@pytest.fixture(scope="module")

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,6 @@ ignore = [
516516
"PLR6201", # Use a `set` literal when testing for membership
517517
"PLR6301", # Method could be a function, class method, or static method
518518
"PLW0603", # Using the global statement to update `SETTINGS` is discouraged
519-
"PLW1508", # Invalid type for environment variable default; expected `str` or `None`
520519
"PTH100", # `os.path.abspath()` should be replaced by `Path.resolve()`
521520
"PTH102", # `os.mkdir()` should be replaced by `Path.mkdir()`
522521
"PTH107", # `os.remove()` should be replaced by `Path.unlink()`

tasks/shared.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Namespace(str, Enum):
2828
INFRAHUB_DATABASE = os.getenv("INFRAHUB_DB_TYPE", DatabaseType.NEO4J.value)
2929
INFRAHUB_ADDRESS = os.getenv("INFRAHUB_ADDRESS", "http://localhost:8000")
3030

31-
INFRAHUB_USE_NATS = bool(os.getenv("INFRAHUB_USE_NATS", False))
31+
INFRAHUB_USE_NATS = bool(os.getenv("INFRAHUB_USE_NATS", None))
3232

3333
DATABASE_DOCKER_IMAGE = os.getenv("DATABASE_DOCKER_IMAGE", None)
3434
MEMGRAPH_DOCKER_IMAGE = os.getenv("MEMGRAPH_DOCKER_IMAGE", "memgraph/memgraph-mage:1.19-memgraph-2.19-no-ml")
@@ -47,8 +47,8 @@ class Namespace(str, Enum):
4747

4848
PWD = os.getcwd()
4949

50-
NBR_WORKERS = os.getenv("PYTEST_XDIST_WORKER_COUNT", 1)
51-
GITHUB_ACTION = os.getenv("GITHUB_ACTION", False)
50+
NBR_WORKERS = int(os.getenv("PYTEST_XDIST_WORKER_COUNT", "1"))
51+
GITHUB_ACTION = os.getenv("GITHUB_ACTION"), False
5252

5353

5454
SERVICE_SERVER_NAME = "server"

0 commit comments

Comments
 (0)