Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions python_eol/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,17 @@ def main() -> int:
)


def foo(*, param: bool) -> None:
# comment
"""multi-line comment."""
a = 3 * 3
b = a
if param:
logging.info("b, a")
else:
c = a * b
logging.info(f"{c=} bar")


if __name__ == "__main__":
raise SystemExit(main())
7 changes: 6 additions & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import pytest
from freezegun import freeze_time

from python_eol.main import _check_python_eol, _get_argparser, main
from python_eol.main import _check_python_eol, _get_argparser, foo, main

skip_py37 = pytest.mark.skipif(
sys.version_info < (3, 8),
Expand Down Expand Up @@ -148,3 +148,8 @@ def test_version_in_dockerfile_close_to_eol(
" (2023-06-27)"
)
assert caplog.record_tuples == [("python_eol.main", log_level, msg)]


def test_foo() -> None:
foo(param=True)
assert True