Skip to content

Commit

Permalink
Make ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann committed Dec 13, 2024
1 parent 7e62749 commit 7b147b9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
from pyam.iiasa import lazy_read_iiasa, read_iiasa
from pyam.ixmp4 import read_ixmp4
from pyam.logging import configure_logging
from pyam.netcdf import read_netcdf
from pyam.run_control import run_control
from pyam.statistics import Statistics
from pyam.testing import assert_iamframe_equal
from pyam.unfccc import read_unfccc
from pyam.utils import IAMC_IDX
from pyam.worldbank import read_worldbank
from pyam.netcdf import read_netcdf

try:
__version__ = version("pyam-iamc")
Expand Down
7 changes: 4 additions & 3 deletions pyam/netcdf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import numpy as np
import datetime as dt

import numpy as np
import pandas as pd

try:
Expand All @@ -10,7 +11,7 @@
xr = None
HAS_XARRAY = False
from pyam.core import IamDataFrame
from pyam.utils import META_IDX, IAMC_IDX
from pyam.utils import IAMC_IDX, META_IDX


def read_netcdf(path):
Expand Down Expand Up @@ -49,7 +50,7 @@ def read_netcdf(path):
else:
raise TypeError(
"Time coordinates can year (integer) or datetime format, found: "
+ ds.coords["time"]
+ _ds.coords["time"]
)

# read `data` table
Expand Down
4 changes: 1 addition & 3 deletions tests/test_cast_to_iamc.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ def test_cast_from_r_df(test_pd_df):
df.columns = list(df.columns[:-2]) + [f"X{c}" for c in df.columns[-2:]]

pdt.assert_series_equal(
IamDataFrame(df)._data,
IamDataFrame(test_pd_df)._data,
check_like=True
IamDataFrame(df)._data, IamDataFrame(test_pd_df)._data, check_like=True
)


Expand Down
2 changes: 1 addition & 1 deletion tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import pytest

from pyam import IamDataFrame, read_datapackage
from pyam.netcdf import read_netcdf
from pyam.testing import assert_iamframe_equal
from pyam.utils import META_IDX
from pyam.netcdf import read_netcdf

from .conftest import META_DF, TEST_DATA_DIR

Expand Down

0 comments on commit 7b147b9

Please sign in to comment.