Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ repos:
- id: flake8
additional_dependencies: [flake8-bugbear]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
hooks:
- id: mypy
pass_filenames: false
additional_dependencies:
- types-requests
args:
- poetry

- repo: https://github.com/timothycrosley/isort
rev: 5.7.0
hooks:
Expand Down
47 changes: 47 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,50 @@ strict_optional = True
warn_unused_ignores = True
warn_redundant_casts = True
warn_unused_configs = True

Comment thread
danieleades marked this conversation as resolved.
# The following whitelist is used to allow for incremental adoption
# of Mypy. Modules should be removed from this whitelist as and when
# their respective type errors have been addressed. No new modules
# should be added to this whitelist.
# see https://github.com/python-poetry/poetry/pull/4510.

[mypy-poetry.config.*]
ignore_errors = True

[mypy-poetry.console.*]
ignore_errors = True

[mypy-poetry.factory.*]
ignore_errors = True

[mypy-poetry.inspection.*]
ignore_errors = True

[mypy-poetry.installation.*]
ignore_errors = True

[mypy-poetry.locations.*]
ignore_errors = True

[mypy-poetry.mixology.*]
ignore_errors = True

[mypy-poetry.packages.*]
ignore_errors = True

[mypy-poetry.plugins.*]
ignore_errors = True

[mypy-poetry.publishing.*]
ignore_errors = True

[mypy-poetry.puzzle.*]
ignore_errors = True

[mypy-poetry.repositories.*]
ignore_errors = True

[mypy-poetry.utils.*]
ignore_errors = True

# end of whitelist
3 changes: 2 additions & 1 deletion poetry/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pkgutil import extend_path
from typing import List


__path__ = extend_path(__path__, __name__)
__path__: List[str] = extend_path(__path__, __name__)
3 changes: 2 additions & 1 deletion poetry/poetry.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pathlib import Path
from typing import TYPE_CHECKING
from typing import List
from typing import Optional

from poetry.__version__ import __version__
from poetry.config.source import Source
Expand Down Expand Up @@ -35,7 +36,7 @@ def __init__(
self._locker = locker
self._config = config
self._pool = Pool()
self._plugin_manager = None
self._plugin_manager: Optional[PluginManager] = None

@property
def locker(self) -> "Locker":
Expand Down