44import json
55import os
66from pathlib import Path
7- from typing import Any , Dict , List , Optional , Union , TYPE_CHECKING
7+ from typing import TYPE_CHECKING , Any , Dict , List , Optional , Union
88
99import pytest
1010
1919@pytest .fixture
2020def sample_json_string () -> str :
2121 """Return a sample JSON string for testing.
22-
22+
2323 Returns:
2424 str: A sample JSON string
2525 """
@@ -29,7 +29,7 @@ def sample_json_string() -> str:
2929@pytest .fixture
3030def sample_json_dict () -> Dict [str , Any ]:
3131 """Return a sample JSON dictionary for testing.
32-
32+
3333 Returns:
3434 Dict[str, Any]: A sample JSON dictionary
3535 """
@@ -43,7 +43,7 @@ def sample_json_dict() -> Dict[str, Any]:
4343@pytest .fixture
4444def sample_json_list () -> List [Dict [str , Any ]]:
4545 """Return a sample JSON list for testing.
46-
46+
4747 Returns:
4848 List[Dict[str, Any]]: A sample list of JSON dictionaries
4949 """
@@ -64,22 +64,22 @@ def sample_json_list() -> List[Dict[str, Any]]:
6464@pytest .fixture
6565def sample_json_file (tmp_path : Path ) -> Path :
6666 """Create a sample JSON file for testing.
67-
67+
6868 Args:
6969 tmp_path (Path): Pytest temporary path fixture
70-
70+
7171 Returns:
7272 Path: Path to the created JSON file
7373 """
7474 file_path = tmp_path / "sample.json"
75-
75+
7676 data = {
7777 "login" : "mojombo" ,
7878 "id" : 1 ,
7979 "avatar_url" : "https://avatars0.githubusercontent.com/u/1?v=4" ,
8080 }
81-
81+
8282 with open (file_path , "w" ) as f :
8383 json .dump (data , f )
84-
85- return file_path
84+
85+ return file_path
0 commit comments