Skip to content

Commit

Permalink
Merge pull request #325 from os-climate/vault-mypy
Browse files Browse the repository at this point in the history
Update to Pydantic 2.x
  • Loading branch information
MichaelTiemannOSC authored Nov 25, 2023
2 parents af7b6c7 + b7bf915 commit 04c0d9f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ITR/data/vault_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,9 @@ def __init__(
)
df = pd.DataFrame()
for scope in ["AnyScope"]:
if production_benchmarks.dict()[scope] is None:
if production_benchmarks.model_dump()[scope] is None:
continue
for benchmark in production_benchmarks.dict()[scope]["benchmarks"]:
for benchmark in production_benchmarks.model_dump()[scope]["benchmarks"]:
bdf = pd.DataFrame.from_dict(
{
r["year"]: [
Expand Down Expand Up @@ -519,9 +519,9 @@ def __init__(
self.projection_controls = projection_controls
df = pd.DataFrame()
for scope in EScope.get_scopes():
if EI_benchmarks.dict()[scope] is None:
if EI_benchmarks.model_dump()[scope] is None:
continue
for benchmark in EI_benchmarks.dict()[scope]["benchmarks"]:
for benchmark in EI_benchmarks.model_dump()[scope]["benchmarks"]:
benchmark_df = pd.DataFrame.from_dict(
{
r["year"]: [
Expand Down

0 comments on commit 04c0d9f

Please sign in to comment.