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

Complete typing for logger_utils.py #4134

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fmuenkel
Copy link
Contributor

Motivation and Explanation: Why and how do your changes improve the library?

More work on #3375

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

@@ -126,7 +126,7 @@ def parse_theme(parser: configparser.SectionProxy) -> Theme:
:func:`make_logger`.

"""
theme = {key.replace("_", "."): parser[key] for key in parser}
theme: dict[str, Any] = {key.replace("_", "."): parser[key] for key in parser}

Choose a reason for hiding this comment

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

why not typing.Dict ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I might be wrong here, but I thought there is no difference between typing.Dict and dict anymore, since PEP 585 introduced generic type support for these built-in types.

Choose a reason for hiding this comment

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

You are right. I was just thinking that you wanted to use typing everywhere ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants