Skip to content

Allow callable prefixes in configureOutput type annotation - #244

Open
jayasree-007 wants to merge 1 commit into
gruns:masterfrom
jayasree-007:callable-prefix-typehint
Open

Allow callable prefixes in configureOutput type annotation#244
jayasree-007 wants to merge 1 commit into
gruns:masterfrom
jayasree-007:callable-prefix-typehint

Conversation

@jayasree-007

Copy link
Copy Markdown

Summary

This PR updates the type annotation for the prefix parameter of configureOutput() to accept Callable[[], str].

The implementation already supports callable prefixes through call_or_value(), but the existing type annotation causes MyPy to report an error when a callable is passed.

Testing

  • Ran mypy icecream successfully with no issues.
  • Ran pytest.
    • 48 tests passed.
    • 1 unrelated Windows-specific test (test_context_abs_path_multi_line) failed due to path parsing (C:\...), which is unrelated to this type annotation change.

Fixes #241

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.

add Callable[[], str] type annotaion for configureOutput prefix

1 participant