Skip to content

Commit

Permalink
replace typing deprecated classes with those from collections.abc
Browse files Browse the repository at this point in the history
  • Loading branch information
CunliangGeng committed Jun 17, 2024
1 parent c607252 commit 2636f78
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/nplinker/genomics/antismash/antismash_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import fnmatch
import logging
import os
from collections.abc import Mapping
from os import PathLike
from pathlib import Path
from typing import Mapping
from Bio import SeqIO
from Bio import SeqRecord
from nplinker.genomics import BGC
Expand Down
4 changes: 2 additions & 2 deletions src/nplinker/genomics/antismash/podp_antismash_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import logging
import re
import time
from collections.abc import Mapping
from collections.abc import Sequence
from os import PathLike
from pathlib import Path
from typing import Mapping
from typing import Sequence
import httpx
from bs4 import BeautifulSoup
from bs4 import NavigableString
Expand Down
4 changes: 2 additions & 2 deletions src/nplinker/genomics/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from __future__ import annotations
import json
import logging
from collections.abc import Mapping
from collections.abc import Sequence
from os import PathLike
from pathlib import Path
from typing import Mapping
from typing import Sequence
from jsonschema import validate
from nplinker.defaults import GENOME_BGC_MAPPINGS_FILENAME
from nplinker.schemas import GENOME_BGC_MAPPINGS_SCHEMA
Expand Down
4 changes: 2 additions & 2 deletions src/nplinker/metabolomics/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from __future__ import annotations
import json
import logging
from collections.abc import Mapping
from collections.abc import Sequence
from os import PathLike
from pathlib import Path
from typing import Mapping
from typing import Sequence
from nplinker.schemas import validate_podp_json
from nplinker.strain import StrainCollection
from .gnps.gnps_file_mapping_loader import GNPSFileMappingLoader
Expand Down
2 changes: 1 addition & 1 deletion src/nplinker/nplinker.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from __future__ import annotations
import logging
import pickle
from collections.abc import Sequence
from os import PathLike
from pprint import pformat
from typing import Sequence
from typing import overload
from . import setup_logging
from .arranger import DatasetArranger
Expand Down
2 changes: 1 addition & 1 deletion src/nplinker/scoring/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import annotations
from typing import Sequence
from collections.abc import Sequence
import pandas as pd
from nplinker.genomics import GCF
from nplinker.metabolomics import MolecularFamily
Expand Down
2 changes: 1 addition & 1 deletion src/nplinker/strain/strain_collection.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import annotations
import json
import logging
from collections.abc import Iterator
from os import PathLike
from typing import Iterator
from jsonschema import validate
from nplinker.schemas import STRAIN_MAPPINGS_SCHEMA
from .strain import Strain
Expand Down
3 changes: 2 additions & 1 deletion src/nplinker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
import sys
import tarfile
import zipfile
from collections.abc import Callable
from collections.abc import Sequence
from os import PathLike
from pathlib import Path
from typing import IO
from typing import Callable, Sequence
import httpx
from rich.progress import BarColumn
from rich.progress import DownloadColumn
Expand Down

0 comments on commit 2636f78

Please sign in to comment.