Skip to content
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

solved mypy errors for poetry.console.application #5368

Conversation

tarun-jethwani
Copy link
Contributor

Pull Request Check List

Resolves: #5017

@tarun-jethwani tarun-jethwani changed the title solved mypy errors for poetry.console.application #5017 solved mypy errors for poetry.console.application Mar 28, 2022
Copy link
Member

@branchvincent branchvincent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot for your contribution 👍 , I just have one comment

@@ -221,7 +221,7 @@ def register_command_loggers(

io = event.io

loggers = [
loggers: list[Any] = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this silences mypy, loggers is really only a list[str]. The actual issue stems from re-using the same variable name for different types. So a more direct solution would be to avoid it on line 235:

for logger_name in loggers:
    logger = logging.getLogger(logger_name)

@tarun-jethwani
Copy link
Contributor Author

tarun-jethwani commented Mar 31, 2022

@branchvincent thank you so much for your feedback, I understood your changes and reason behind that but I recently found out that someone is already working on this module for mypy errors there is an open PR for that

Meanwhile I have taken up modules inside poetry.mixology will solve mypy errors for that and submit a New PR

Please stay updated on this issue #5017 to review my Next PR

@branchvincent
Copy link
Member

sounds good @tarun-jethwani, I'll close this pr in favor of #5258

Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code Quality: Incremental adoption of mypy type checks
2 participants