Refactor logging code: Remove unnecessary blank lines in logging setup and cleanup functions for improved readability. Update tests to reflect formatting changes.

This commit is contained in:
yashksaini-coder
2025-09-02 01:39:24 +05:30
parent 84c1a7031a
commit 145727a9ba
3 changed files with 14 additions and 12 deletions

View File

@ -203,7 +203,9 @@ async def test_default_log_file(clean_env):
with patch("libp2p.utils.paths.create_temp_file") as mock_create_temp: with patch("libp2p.utils.paths.create_temp_file") as mock_create_temp:
# Mock the temp file creation to return a predictable path # Mock the temp file creation to return a predictable path
mock_temp_file = Path(tempfile.gettempdir()) / "test_py-libp2p_20240101_120000.log" mock_temp_file = (
Path(tempfile.gettempdir()) / "test_py-libp2p_20240101_120000.log"
)
mock_create_temp.return_value = mock_temp_file mock_create_temp.return_value = mock_temp_file
# Remove the log file if it exists # Remove the log file if it exists