Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Feb 19, 2023
1 parent 55aac8e commit f04092a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/lowtran/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def nm2lt7(short_nm: float, long_nm: float, step_cminv: float = 20) -> tuple[flo
return short, long, N


def loopuserdef(c1: dict[str, Any]) -> xarray.Dataset:
def loopuserdef(c1: dict[str, Any]):
"""
golowtran() is for scalar parameters only
(besides vector of wavelength, which Lowtran internally loops over)
Expand Down Expand Up @@ -80,7 +80,7 @@ def loopuserdef(c1: dict[str, Any]) -> xarray.Dataset:
return TR


def loopangle(c1: dict[str, Any]) -> xarray.Dataset:
def loopangle(c1: dict[str, Any]):
"""
loop over "ANGLE"
"""
Expand All @@ -95,7 +95,7 @@ def loopangle(c1: dict[str, Any]) -> xarray.Dataset:
return TR


def golowtran(c1: dict[str, Any]) -> xarray.Dataset:
def golowtran(c1: dict[str, Any]):
"""directly run Fortran code"""
# %% default parameters
c1.setdefault("time", None)
Expand Down
4 changes: 2 additions & 2 deletions src/lowtran/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
__all__ = ["build"]


def build(source_dir: Path, build_dir: Path):
def build(source_dir: Path, build_dir: Path) -> None:
"""build with CMake"""
cmake = shutil.which("cmake")
if not cmake:
raise FileNotFoundError("CMake not found. Try:\n pip install cmake")

env = os.environ.copy()
if os.name == "nt" and not "CMAKE_GENERATOR" in env:
if os.name == "nt" and "CMAKE_GENERATOR" not in env:
if shutil.which("ninja"):
env["CMAKE_GENERATOR"] = "Ninja"
elif shutil.which("mingw32-make"):
Expand Down
14 changes: 7 additions & 7 deletions src/lowtran/scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .base import loopangle, loopuserdef, golowtran


def scatter(c1: dict[str, Any]) -> xarray.Dataset:
def scatter(c1: dict[str, Any]):
# %% low-level Lowtran configuration for this scenario, don't change
c1.update(
{
Expand All @@ -21,7 +21,7 @@ def scatter(c1: dict[str, Any]) -> xarray.Dataset:
return loopangle(c1)


def irradiance(c1: dict[str, Any]) -> xarray.Dataset:
def irradiance(c1: dict[str, Any]):
c1.update(
{
"itype": 3, # 3: observer to space
Expand All @@ -32,7 +32,7 @@ def irradiance(c1: dict[str, Any]) -> xarray.Dataset:
return loopangle(c1)


def radiance(c1: dict[str, Any]) -> xarray.Dataset:
def radiance(c1: dict[str, Any]):

c1.update(
{
Expand All @@ -44,7 +44,7 @@ def radiance(c1: dict[str, Any]) -> xarray.Dataset:
return loopangle(c1)


def transmittance(c1: dict[str, Any]) -> xarray.Dataset:
def transmittance(c1: dict[str, Any]):

c1.update(
{
Expand All @@ -56,7 +56,7 @@ def transmittance(c1: dict[str, Any]) -> xarray.Dataset:
return loopangle(c1)


def horizrad(infn: Path, outfn: Path, c1: dict[str, Any]) -> xarray.Dataset:
def horizrad(infn: Path, outfn: Path, c1: dict[str, Any]):
"""
read CSV, simulate, write, plot
"""
Expand Down Expand Up @@ -98,7 +98,7 @@ def horizrad(infn: Path, outfn: Path, c1: dict[str, Any]) -> xarray.Dataset:
return TR


def horiztrans(c1: dict[str, Any]) -> xarray.Dataset:
def horiztrans(c1: dict[str, Any]):

c1.update(
{
Expand All @@ -113,7 +113,7 @@ def horiztrans(c1: dict[str, Any]) -> xarray.Dataset:
return golowtran(c1)


def userhoriztrans(c1: dict[str, Any]) -> xarray.Dataset:
def userhoriztrans(c1: dict[str, Any]):

c1.update(
{
Expand Down

0 comments on commit f04092a

Please sign in to comment.