Skip to content

Commit

Permalink
Added Generator type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
Pale-Blue-Dot-97 committed May 16, 2023
1 parent e717bed commit e9a50d4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import os
import shutil
from pathlib import Path
from typing import Dict, Tuple
from typing import Dict, Generator, Tuple

import numpy as np
import pytest
Expand Down Expand Up @@ -76,7 +76,7 @@ def set_multiprocessing_to_fork():


@pytest.fixture(scope="session", autouse=True)
def results_dir() -> Path:
def results_dir() -> Generator[Path, None, None]:
path = Path(__file__).parent / "tmp" / "results"
if not path.exists():
path.mkdir(parents=True)
Expand All @@ -102,7 +102,7 @@ def lc_root(data_root: Path) -> Path:


@pytest.fixture
def config_root(data_root: Path) -> Path:
def config_root(data_root: Path) -> Generator[Path, None, None]:
config_path = data_root.parent / "config"

# Make a temporary copy of a config manifest example
Expand All @@ -117,7 +117,7 @@ def config_root(data_root: Path) -> Path:


@pytest.fixture
def config_here() -> Path:
def config_here() -> Generator[Path, None, None]:
here = Path(__file__).parent.parent

# Make a temporary copy where we're running from
Expand Down Expand Up @@ -274,6 +274,6 @@ def default_dataset() -> GeoDataset:


@pytest.fixture(scope="session", autouse=True)
def wandb_offline() -> None:
def wandb_offline() -> Generator[int, None, None]:
yield os.system("wandb offline") # nosec B605, B607
os.system("wandb online") # nosec B605, B607

0 comments on commit e9a50d4

Please sign in to comment.