Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: linting issues #296

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions medmodels/medrecord/medrecord.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ def __init__(
"""Initializes the OverviewTable class.

Args:
data (Dict[Group, AttributeSummary]): Dictionary containing attribute info for edges/nodes.
data (Dict[Group, AttributeSummary]): Dictionary containing attribute
information.
group_header (str): Header for group column, i.e. 'Group Nodes'.
decimal (int): Decimal point to round the float values to.
"""
Expand Down Expand Up @@ -1302,14 +1303,9 @@ def _describe_group_nodes(
) -> Dict[Group, AttributeSummary]:
"""Creates a summary of group nodes and their attributes.

Returns:
<<<<<<< HEAD
Dict[Group, AttributeSummary]: Dictionary with all nodes in medrecord groups
and their attributes.
=======
pl.DataFrame: Dataframe with all nodes in medrecord groups and their
attributes.
>>>>>>> main
Returns:
Dict[Group, AttributeSummary]: Dictionary with all nodes in medrecord groups
and their attributes.
"""
nodes_info = {}
grouped_nodes = []
Expand Down
11 changes: 0 additions & 11 deletions medmodels/statistic_evaluations/evaluate_compare/compare.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

from typing import Dict, List, Tuple, TypedDict

from medmodels.medrecord.types import (
Expand All @@ -12,28 +10,19 @@ from medmodels.medrecord.types import (
from medmodels.statistic_evaluations.evaluate_compare.evaluate import CohortEvaluator

class CohortSummary(TypedDict):
"""Dictionary for the cohort summary."""

attribute_info: Dict[Group, AttributeSummary]
top_k_concepts: Dict[Group, List[NodeIndex]]

class DistanceSummary(TypedDict):
"""Dictonary for the Jensen-Shannon-Divergence and normalized distance between
distributions."""

js_divergence: float
distance: float

class ComparerSummary(TypedDict):
"""Dictionary for comparing results."""

attribute_tests: Dict[MedRecordAttribute, List[TestSummary]]
concepts_tests: Dict[Group, List[TestSummary]]
concepts_distance: Dict[Group, DistanceSummary]

class TestSummary(TypedDict):
"""Dictionary for hypothesis test results."""

test: str
Hypothesis: str
not_reject: bool
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

from typing import Dict, List, Optional, Tuple, Union

from medmodels.medrecord.medrecord import MedRecord
Expand Down
Loading