Skip to content

Cannot import Parser due to circular import #689

Closed
@davmlaw

Description

The linting change introduced a circular dependency

from hgvs.parser import Parser

Now dies with:

/usr/local/lib/python3.10/dist-packages/hgvs/normalizer.py in <module>
     19     HGVSUnsupportedOperationError,
     20 )
---> 21 from hgvs.parser import Parser
     22 from hgvs.utils.norm import normalize_alleles
     23 

ImportError: cannot import name 'Parser' from partially initialized module 'hgvs.parser' (most likely due to a circular import) (/usr/local/lib/python3.10/dist-packages/hgvs/parser.py)

This should be an easy fix, just import in the main section instead of the module

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions