Skip to content

Commit

Permalink
fix app circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
davebulaval committed Jun 23, 2024
1 parent 4955529 commit 4cf7f05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 2 additions & 4 deletions deepparse/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import logging
from contextlib import asynccontextmanager
from typing import List, Dict
from typing import List

from deepparse.app.address import Address
from deepparse.app.tools import format_parsed_addresses
from deepparse.app.tools import format_parsed_addresses, address_parser_mapping
from deepparse.download_tools import MODEL_MAPPING_CHOICES, download_models
from deepparse.parser import AddressParser

Expand All @@ -23,8 +23,6 @@

configure_sentry()

address_parser_mapping: Dict[str, AddressParser] = {}


@asynccontextmanager
async def lifespan(application: FastAPI): # pylint: disable=unused-argument
Expand Down
4 changes: 3 additions & 1 deletion deepparse/app/tools.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from typing import List, Dict, Union

from deepparse.app import address_parser_mapping
from deepparse.app.address import Address
from deepparse.download_tools import MODEL_MAPPING_CHOICES
from deepparse.parser import AddressParser

address_parser_mapping: Dict[str, AddressParser] = {}


def format_parsed_addresses(
Expand Down

0 comments on commit 4cf7f05

Please sign in to comment.