(username: str, since: str)
| 69 | |
| 70 | |
| 71 | def write_cursor(username: str, since: str): |
| 72 | if not API_DB_PATH.exists(): |
| 73 | atomic_write(API_DB_PATH, "") |
| 74 | |
| 75 | since_file = ConfigParser() |
| 76 | since_file.optionxform = str |
| 77 | since_file.read(API_DB_PATH) |
| 78 | |
| 79 | since_file[username] = {"since": since} |
| 80 | |
| 81 | with open(API_DB_PATH, "w+") as new: |
| 82 | since_file.write(new) |
| 83 | |
| 84 | |
| 85 | def read_cursor(username: str) -> Optional[str]: |
no test coverage detected