Skip to content

Commit

Permalink
Move import to function to avoid global dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaris committed Dec 16, 2023
1 parent 3d5aadb commit 18f89cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions indra/literature/pubmed_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
from typing import List
from functools import lru_cache
import xml.etree.ElementTree as ET

from bs4 import BeautifulSoup

from indra.resources import RESOURCES_PATH
from indra.util import UnicodeXMLTreeBuilder as UTB
from indra.util import batch_iter, pretty_save_xml
Expand Down Expand Up @@ -1061,6 +1058,8 @@ def ensure_xml_files(xml_path: str, retries: int = 3):

def _get_urls(url: str):
"""Get the paths to all XML files on the PubMed FTP server."""
from bs4 import BeautifulSoup

logger.info("Getting URL paths from %s" % url)

# Get page
Expand Down

0 comments on commit 18f89cd

Please sign in to comment.