Skip to content

check the typing signatures #40

@pnrobinson

Description

@pnrobinson

In HPOStatisticsAnalyzer, we have this function

  def compute_correlation_matrix(
            self, 
            correlation_type: CorrelationType = CorrelationType.SPEARMAN, 
            n_jobs: int = -1,
        ) -> None:

But it actually returns a pd.DataFrame. The code still works, but it is marked as an error. For instance

df = df[(df["p_value_corrected"]<0.05) & (df["correlation"] > 0.5)]

In my system, df is marked with a red error that says Object of type "None" is not subscriptablePylance

This is because according to the typing annotations, the function seems to be returning None.
We should try to make sure that the code shows no errors like this!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions