Skip to content

Commit

Permalink
Replace JSON round-trip with .dict()
Browse files Browse the repository at this point in the history
  • Loading branch information
srilman authored and maresb committed May 20, 2023
1 parent e6e81bd commit 7e40989
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions conda_lock/lockfile/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import json
import pathlib

from collections import defaultdict
Expand Down Expand Up @@ -203,10 +202,8 @@ def write_section(text: str) -> None:

output: Dict[str, Any] = {
"version": Lockfile.version,
"metadata": json.loads(
content.metadata.json(
by_alias=True, exclude_unset=True, exclude_none=True
)
"metadata": content.metadata.dict(
by_alias=True, exclude_unset=True, exclude_none=True
),
"package": [],
}
Expand Down

0 comments on commit 7e40989

Please sign in to comment.