Remove now unnecessary util submodule
This commit is contained in:
@@ -26,7 +26,6 @@ from .normalizers import (
|
||||
encode_component, normalize_scheme, normalize_authority, normalize_path,
|
||||
normalize_query, normalize_fragment
|
||||
)
|
||||
from .util import remove_none_values
|
||||
|
||||
|
||||
class URIReference(namedtuple('URIReference', URI_COMPONENTS)):
|
||||
@@ -374,7 +373,9 @@ class URIReference(namedtuple('URIReference', URI_COMPONENTS)):
|
||||
'query': query,
|
||||
'fragment': fragment,
|
||||
}
|
||||
attributes = remove_none_values(attributes)
|
||||
for key, value in list(attributes.items()):
|
||||
if value is None:
|
||||
del attributes[key]
|
||||
return self._replace(**attributes)
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ from collections import namedtuple
|
||||
|
||||
from . import normalizers
|
||||
from . import uri
|
||||
from . import util
|
||||
|
||||
PARSED_COMPONENTS = ('scheme', 'userinfo', 'host', 'port', 'path', 'query',
|
||||
'fragment')
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
def remove_none_values(dictionary):
|
||||
return_dictionary = {}
|
||||
for key, value in dictionary.items():
|
||||
if value is not None:
|
||||
return_dictionary[key] = value
|
||||
|
||||
return return_dictionary
|
||||
Reference in New Issue
Block a user