Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add disallow_untyped_defs=True for pip._internal.collector
Browse files Browse the repository at this point in the history
mkurnikov committed Nov 14, 2019
1 parent ccd2ced commit 93fc2b9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pip/_internal/index/collector.py
Original file line number Diff line number Diff line change
@@ -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 @@ def __init__(
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)

0 comments on commit 93fc2b9

Please sign in to comment.