Skip to content

fix: export Logger type from cve_bin_tool.log - #6189

Closed
sergiodaleste2-byte wants to merge 1 commit into
ossf:mainfrom
sergiodaleste2-byte:fix-2870-logger-type
Closed

sergiodaleste2-byte wants to merge 1 commit into
ossf:mainfrom
sergiodaleste2-byte:fix-2870-logger-type

Conversation

@sergiodaleste2-byte

Copy link
Copy Markdown

Fixes #2870

Summary

  • Export Logger class from logging inside cve_bin_tool/log.py and include it in __all__.
  • Allows using from cve_bin_tool.log import Logger as a valid type annotation without triggering mypy errors ("cve_bin_tool.log.LOGGER" is not a valid type).

Signed-off-by: sergiodaleste2-byte <sergiodaleste2-byte@users.noreply.github.com>
@ffontaine

Copy link
Copy Markdown
Collaborator

The issue this PR references (#2870) was already resolved by commit bb3ff32, merged on November 14, 2026.

The current implementation already explicitly annotates LOGGER as logging.Logger:

LOGGER: logging.Logger = logging.getLogger(__package__)

This PR only re-exports the standard-library logging.Logger class from cve_bin_tool.log, without changing the existing logger typing.

Could you clarify the intended use case for this additional public API? In particular, what problem does exporting Logger solve that is not already addressed by the merged fix?

I don't think the original issue provides sufficient justification for this change.

@sergiodaleste2-byte

sergiodaleste2-byte commented Dec 4, 2026 via email

Copy link
Copy Markdown
Author

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.

"cve_bin_tool.log.LOGGER is not a valid type"

2 participants