Skip to content

Commit

Permalink
LNT: Run pre-commit. [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Taher Chegini committed Mar 11, 2024
1 parent 0844693 commit eb81623
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 8 deletions.
2 changes: 2 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Configuration for pytest."""

from __future__ import annotations

import pytest
from click.testing import CliRunner

Expand Down
1 change: 1 addition & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Nox sessions."""

from __future__ import annotations

import shutil
Expand Down
3 changes: 3 additions & 0 deletions pydaymet/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
"""Top-level package for PyDaymet."""

from __future__ import annotations

from importlib.metadata import PackageNotFoundError, version

from pydaymet.core import Daymet, separate_snow
Expand Down
1 change: 1 addition & 0 deletions pydaymet/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Command-line interface for PyDaymet."""

from __future__ import annotations

import itertools
Expand Down
1 change: 1 addition & 0 deletions pydaymet/core.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Core class for the Daymet functions."""

# pyright: reportGeneralTypeIssues=false
from __future__ import annotations

Expand Down
1 change: 1 addition & 0 deletions pydaymet/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Customized PyDaymet exceptions."""

from __future__ import annotations

from typing import Generator, Sequence
Expand Down
13 changes: 5 additions & 8 deletions pydaymet/pet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Core class for the Daymet functions."""

# pyright: reportReturnType=false,reportArgumentType=false
from __future__ import annotations

Expand Down Expand Up @@ -124,13 +125,11 @@ def vapor_pressure(tmax_c: DS, tmin_c: DS) -> DS:


@overload
def extraterrestrial_radiation(dayofyear: xr.DataArray, lat: xr.DataArray) -> xr.DataArray:
...
def extraterrestrial_radiation(dayofyear: xr.DataArray, lat: xr.DataArray) -> xr.DataArray: ...


@overload
def extraterrestrial_radiation(dayofyear: pd.Series, lat: float) -> pd.Series:
...
def extraterrestrial_radiation(dayofyear: pd.Series, lat: float) -> pd.Series: ...


def extraterrestrial_radiation(
Expand Down Expand Up @@ -741,8 +740,7 @@ def potential_et(
crs: CRSTYPE,
method: Literal["penman_monteith", "priestley_taylor", "hargreaves_samani"] = ...,
params: dict[str, float] | None = ...,
) -> pd.DataFrame:
...
) -> pd.DataFrame: ...


@overload
Expand All @@ -752,8 +750,7 @@ def potential_et(
crs: None = None,
method: Literal["penman_monteith", "priestley_taylor", "hargreaves_samani"] = ...,
params: dict[str, float] | None = ...,
) -> xr.Dataset:
...
) -> xr.Dataset: ...


def potential_et(
Expand Down
1 change: 1 addition & 0 deletions pydaymet/print_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
The original script is from
`xarray <https://github.com/pydata/xarray/blob/main/xarray/util/print_versions.py>`__
"""

# pyright: reportMissingImports=false
from __future__ import annotations

Expand Down
1 change: 1 addition & 0 deletions pydaymet/pydaymet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Access the Daymet database for both single single pixel and gridded queries."""

# pyright: reportArgumentType=false,reportCallIssue=false,reportReturnType=false
from __future__ import annotations

Expand Down
2 changes: 2 additions & 0 deletions tests/test_exceptions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import shutil
from pathlib import Path

Expand Down
3 changes: 3 additions & 0 deletions tests/test_pydaymet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
"""Tests for PyDaymet package."""

from __future__ import annotations

import io
import shutil
from pathlib import Path
Expand Down

0 comments on commit eb81623

Please sign in to comment.