Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
d9ba44b4
Unverified
Commit
d9ba44b4
authored
Nov 13, 2021
by
danieleades
Committed by
GitHub
Nov 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set up mypy pre-commit hook for incremental adoption (#4510)
parent
a49372a5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
2 deletions
+61
-2
.pre-commit-config.yaml
+10
-0
mypy.ini
+47
-0
poetry/__init__.py
+2
-1
poetry/poetry.py
+2
-1
No files found.
.pre-commit-config.yaml
View file @
d9ba44b4
...
...
@@ -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
:
...
...
mypy.ini
View file @
d9ba44b4
...
...
@@ -6,3 +6,50 @@ strict_optional = True
warn_unused_ignores
=
True
warn_redundant_casts
=
True
warn_unused_configs
=
True
# 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
poetry/__init__.py
View file @
d9ba44b4
from
pkgutil
import
extend_path
from
typing
import
List
__path__
=
extend_path
(
__path__
,
__name__
)
__path__
:
List
[
str
]
=
extend_path
(
__path__
,
__name__
)
poetry/poetry.py
View file @
d9ba44b4
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
...
...
@@ -35,7 +36,7 @@ class Poetry(BasePoetry):
self
.
_locker
=
locker
self
.
_config
=
config
self
.
_pool
=
Pool
()
self
.
_plugin_manager
=
None
self
.
_plugin_manager
:
Optional
[
PluginManager
]
=
None
@property
def
locker
(
self
)
->
"Locker"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment