Skip to content

Commit

Permalink
Use mypy's inline configuration syntax for opt-outs
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Jul 30, 2019
1 parent 800f866 commit f377148
Show file tree
Hide file tree
Showing 24 changed files with 74 additions and 76 deletions.
75 changes: 0 additions & 75 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,81 +26,6 @@ ignore = W504
follow_imports = silent
ignore_missing_imports = True

[mypy-pip/_internal/build_env]
strict_optional = False

[mypy-pip/_internal/cache]
strict_optional = False

[mypy-pip/_internal/cli/base_command]
strict_optional = False

[mypy-pip/_internal/cli/cmdoptions]
strict_optional = False

[mypy-pip/_internal/configuration]
strict_optional = False

[mypy-pip/_internal/index]
strict_optional = False

[mypy-pip/_internal/legacy_resolve]
strict_optional = False

[mypy-pip/_internal/locations]
strict_optional = False

[mypy-pip/_internal/models/format_control]
strict_optional = False

[mypy-pip/_internal/operations/check]
strict_optional = False

[mypy-pip/_internal/operations/freeze]
strict_optional = False

[mypy-pip/_internal/operations/prepare]
strict_optional = False

[mypy-pip/_internal/pep425tags]
strict_optional = False

[mypy-pip/_internal/req/*]
disallow_untyped_defs = True

[mypy-pip/_internal/req]
strict_optional = False

[mypy-pip/_internal/req/constructors]
strict_optional = False

[mypy-pip/_internal/req/req_file]
strict_optional = False

[mypy-pip/_internal/req/req_install]
strict_optional = False

[mypy-pip/_internal/req/req_set]
strict_optional = False

[mypy-pip/_internal/req/req_tracker]
strict_optional = False

[mypy-pip/_internal/utils/encoding]
strict_optional = False

[mypy-pip/_internal/utils/glibc]
strict_optional = False

[mypy-pip/_internal/utils/misc]
strict_optional = False

[mypy-pip/_internal/utils/ui]
strict_optional = False

[mypy-pip/_internal/wheel]
strict_optional = False

[mypy-pip/_vendor/*]
follow_imports = skip
ignore_errors = True
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/build_env.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
"""Build Environment used for isolation during sdist building
"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

import logging
import os
import sys
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/cache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
"""Cache Management
"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

import errno
import hashlib
import logging
Expand Down
4 changes: 4 additions & 0 deletions src/pip/_internal/cli/base_command.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""Base Command class, and related routines"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import, print_function

import logging
Expand Down
5 changes: 4 additions & 1 deletion src/pip/_internal/cli/cmdoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
globally. One reason being that options with action='append' can carry state
between parses. pip parses general options twice internally, and shouldn't
pass on state. To be consistent, all options will follow this design.
"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import

import logging
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
A single word describing where the configuration key-value pair came from
"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

import locale
import logging
import os
Expand Down
4 changes: 4 additions & 0 deletions src/pip/_internal/index.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""Routines related to PyPI, indexes"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import

import cgi
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/legacy_resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
a. "first found, wins" (where the order is breadth first)
"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

import logging
import sys
from collections import defaultdict
Expand Down
4 changes: 4 additions & 0 deletions src/pip/_internal/locations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""Locations where we look for configs, install stuff, etc"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import

import os
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/models/format_control.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from pip._vendor.packaging.utils import canonicalize_name

from pip._internal.utils.typing import MYPY_CHECK_RUNNING
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/operations/check.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
"""Validation of dependencies of packages
"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

import logging
from collections import namedtuple

Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/operations/freeze.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import

import collections
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/operations/prepare.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
"""Prepares a distribution for installation
"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

import logging
import os

Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/req/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import

import logging
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/req/constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
InstallRequirement.
"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

import logging
import os
import re
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/req/req_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Requirements file parsing
"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import

import optparse
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/req/req_install.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import

import logging
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/req/req_set.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import

import logging
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/req/req_tracker.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import

import contextlib
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/utils/encoding.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

import codecs
import locale
import re
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/utils/glibc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import

import os
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/utils/misc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import

import contextlib
Expand Down
3 changes: 3 additions & 0 deletions src/pip/_internal/utils/ui.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import, division

import contextlib
Expand Down
4 changes: 4 additions & 0 deletions src/pip/_internal/wheel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
"""
Support for installing and building the "wheel" binary package format.
"""

# The following comment should be removed at some point in the future.
# mypy: strict-optional=False

from __future__ import absolute_import

import collections
Expand Down

0 comments on commit f377148

Please sign in to comment.