Skip to content

Import Error when Importing on Python 3.9 #130

@crsct

Description

@crsct

The current layout of the pl.py file is importing tss_enrichment_plot as tss_enrichment and tss_enrichment_score_plot as tss_enrichment_score which is not a viable import name, I imagine this has slipped through some cracks as my previous contribution has been left unnoticed for a year.

File episcanpy/api/pl.py:20
     18 from ..preprocessing._quality_control import cal_var, variability_features
     19 from ..preprocessing._tss_enrichment import tss_enrichment_plot as tss_enrichment
---> 20 from ..preprocessing._tss_enrichment import tss_enrichment_score_plot as tss_enrichment_score

ImportError: cannot import name 'tss_enrichment_score_plot' from 'episcanpy.preprocessing._tss_enrichment' (./episcanpy/preprocessing/_tss_enrichment.

Is it safe to simply change these lines like this?

-from ..preprocessing._tss_enrichment import tss_enrichment_plot as tss_enrichment
-from ..preprocessing._tss_enrichment import tss_enrichment_score_plot as tss_enrichment_score
+from ..preprocessing._tss_enrichment import tss_enrichment_plot 
+from ..preprocessing._tss_enrichment import tss_enrichment 

it does not seem to throw the error, testing is also successful, but I am still uncertain as I have no grasp over the code base and apparently the prior code also works.

Could someone fill me in how it was supposed to work?

Metadata

Metadata

Assignees

No one assigned

    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