Skip to content

Commit

Permalink
[#158] Add type hints to core.comparison.get_comparison_leaves()
Browse files Browse the repository at this point in the history
  • Loading branch information
riley-harper committed Oct 29, 2024
1 parent 4619d63 commit 4023733
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hlink/linking/core/comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
# For copyright and licensing information, see the NOTICE and LICENSE files
# in this project's top-level directory, and also on-line at:
# https://github.com/ipums/hlink
from typing import Any

import hlink.linking.core.comparison_feature as comparison_feature_core


def get_comparison_leaves(comp):
def get_comparison_leaves(comp: dict[str, Any]) -> list[dict[str, Any]]:
comp_leaves = []

def _get_comp_leaf(comp, comp_leaves):
def _get_comp_leaf(comp: dict[str, Any], comp_leaves: list[dict[str, Any]]) -> None:
if "comp_a" in comp:
_get_comp_leaf(comp["comp_a"], comp_leaves)
_get_comp_leaf(comp["comp_b"], comp_leaves)
Expand Down

0 comments on commit 4023733

Please sign in to comment.