add disallow_untyped_defs=True for pip._internal.collector

This commit is contained in:
Maxim Kurnikov 2019-11-16 16:53:44 +03:00
parent ccd2ced9bc
commit e9fcd75cab
1 changed files with 2 additions and 3 deletions

View File

@ -2,9 +2,6 @@
The main purpose of this module is to expose LinkCollector.collect_links().
"""
# The following comment should be removed at some point in the future.
# mypy: disallow-untyped-defs=False
import cgi
import itertools
import logging
@ -290,6 +287,7 @@ class HTMLPage(object):
self.url = url
def __str__(self):
# type: () -> str
return redact_auth_from_url(self.url)
@ -385,6 +383,7 @@ def group_locations(locations, expand_dir=False):
# puts the url for the given file path into the appropriate list
def sort_path(path):
# type: (str) -> None
url = path_to_url(path)
if mimetypes.guess_type(url, strict=False)[0] == 'text/html':
urls.append(url)