-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing type hints - Part 1 #4775
Merged
neersighted
merged 26 commits into
python-poetry:master
from
finswimmer:improvement/force-type-hints
Nov 19, 2021
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
47c0603
add missing type hints to application code
finswimmer 343428e
add typehints to tests.config, tests.console.commands.debug, tests.co…
finswimmer d9f6d10
add typehints to tests.console.commands.plugin
finswimmer f6ebbab
add typehints to tests.self
finswimmer 31cdfc5
add typehints to tests.console.commands.source
finswimmer df27a71
add typehints to tests.console.commands.about
finswimmer d509203
add typehints tests.console.commands.add
finswimmer d6a392f
add typehints to tests.console.commands.test_cache
finswimmer e2acde4
add typehints to tests.console.commands.test_check
finswimmer 321160f
add typehints to tests.console.commands.test_config
finswimmer df5583d
add typehints to tests.console.commands.test_export
finswimmer 3f16a9f
add typehints to tests.console.commands.test_init
finswimmer 0f536a9
add typehints to tests.console.commands.test_install
finswimmer b84fab9
add typehints to tests.console.commands.test_lock
finswimmer f90258b
add typehints to tests.console.commands.test_new
finswimmer 2c2b7b8
add typehints to tests.console.commands.test_publish
finswimmer 32afc8b
add typehints to tests.console.commands.test_remove
finswimmer 67da19d
add typehints to tests.console.commands.test_run
finswimmer 18e930d
add typehints to tests.console.commands.test_search
finswimmer c2e0141
add typehints to tests.console.commands.test_show
finswimmer 55e5ba2
add typehints to tests.console.commands.test_version
finswimmer bc6d92d
add typehints to tests.console.test_application
finswimmer 6d3aafe
add typehints to tests.console.conftest
finswimmer 12a24f6
add typehints to tests.console.conftest
finswimmer d90bb45
add python version constraint for typing-extension
finswimmer 1ed885a
fix type hint for http fixture
finswimmer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
from typing import TYPE_CHECKING | ||
|
||
from poetry.plugins.base_plugin import BasePlugin | ||
|
||
|
||
if TYPE_CHECKING: | ||
from poetry.console.application import Application | ||
|
||
|
||
class ApplicationPlugin(BasePlugin): | ||
""" | ||
Base class for plugins. | ||
""" | ||
|
||
type = "application.plugin" | ||
|
||
def activate(self, application): | ||
def activate(self, application: "Application") -> None: | ||
raise NotImplementedError() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit, but we are doing spaces around the braces.
(Side note: why doesn't poetry honor with with
poetry add
?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this is how
poetry add
inserted it, I would prefer leaving it like it is.