Skip to content

Commit 350b2b7

Browse files
authored
build: use standard lib urlparse (#181)
1 parent b5201d3 commit 350b2b7

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

cool_seq_tool/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
SEQREPO_ROOT_DIR, TRANSCRIPT_MAPPINGS_PATH
1414
from cool_seq_tool.schemas import Assembly, GenomicData, TranscriptExonData, \
1515
ResidueMode, GenomicDataResponse, ServiceMeta, TranscriptExonDataResponse
16-
from cool_seq_tool.data_sources import MANETranscript, MANETranscriptMappings,\
16+
from cool_seq_tool.data_sources import MANETranscript, MANETranscriptMappings, \
1717
SeqRepoAccess, TranscriptMappings, UTADatabase, GeneNormalizer
1818
from cool_seq_tool.version import __version__
1919

cool_seq_tool/data_sources/uta_database.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
import logging
55
from typing import Dict, List, Optional, Tuple, Any, TypeVar, Type, Union
66
from os import environ
7-
from urllib.parse import quote, unquote
7+
from urllib.parse import quote, unquote, urlparse, ParseResult as UrlLibParseResult
88

9-
from six.moves.urllib import parse as urlparse
109
import pandas as pd
1110
import asyncpg
1211
import boto3
@@ -94,7 +93,7 @@ def _get_conn_args(self) -> Dict:
9493
return dict(host=host, port=int(port), database=database, user=username,
9594
password=password)
9695
else:
97-
url = ParseResult(urlparse.urlparse(self.db_url))
96+
url = ParseResult(urlparse(self.db_url))
9897
self.schema = url.schema
9998
password = unquote(url.password) if url.password else ""
10099
return dict(host=url.hostname, port=url.port,
@@ -1129,7 +1128,7 @@ def get_secret() -> str:
11291128
return decoded_binary_secret
11301129

11311130

1132-
class ParseResult(urlparse.ParseResult):
1131+
class ParseResult(UrlLibParseResult):
11331132
"""Subclass of url.ParseResult that adds database and schema methods,
11341133
and provides stringification.
11351134
Source: https://github.com/biocommons/hgvs

tests/unit/test_mane_transcript.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from mock import patch
66
import pandas as pd
77

8-
from cool_seq_tool.data_sources import MANETranscript, MANETranscriptMappings,\
8+
from cool_seq_tool.data_sources import MANETranscript, MANETranscriptMappings, \
99
SeqRepoAccess, TranscriptMappings, UTADatabase, GeneNormalizer
1010
from cool_seq_tool.data_sources.mane_transcript import MANETranscriptError
1111
from cool_seq_tool.schemas import AnnotationLayer, Assembly, ResidueMode

0 commit comments

Comments
 (0)