Skip to content

Commit

Permalink
update typing via ruff, since we require python >=3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
vtnate committed Jan 14, 2025
1 parent 5857abb commit 4d58b9c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions urbanopt_des/modelica_results.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import json
from datetime import datetime, timedelta
from pathlib import Path
from typing import Dict, Union

import numpy as np
import pandas as pd
from buildingspy.io.outputfile import Reader

from .emissions import HourlyEmissionsData

VariablesDict = Dict[str, Union[bool, str, int, str]]
VariablesDict = dict[str, bool | str | int | str]


class ModelicaResults:
Expand Down Expand Up @@ -99,8 +98,8 @@ def number_of_buildings(self, building_count_var: str = "nBui") -> int:

def resample_and_convert_to_df(
self,
building_ids: Union[list[str], None] = None,
other_vars: Union[list[str], None] = None,
building_ids: list[str] | None = None,
other_vars: list[str] | None = None,
year_of_data: int = 2017,
) -> None:
"""The Modelica data (self.modelica_data) are stored in a Reader object and the timesteps are non ideal for comparison across models. The method handles
Expand Down Expand Up @@ -237,7 +236,7 @@ def resample_and_convert_to_df(

def combine_with_openstudio_results(
self,
building_ids: Union[list[str], None],
building_ids: list[str] | None,
openstudio_df: pd.DataFrame,
openstudio_df_15: pd.DataFrame,
) -> None:
Expand Down

0 comments on commit 4d58b9c

Please sign in to comment.