(self, path: str)
| 38 | return cls(name=url.split("/")[-1], content=await r.read()) |
| 39 | |
| 40 | def save(self, path: str) -> None: |
| 41 | if not path.startswith("/"): |
| 42 | path = f"./{path}" |
| 43 | with open(path, "wb") as f: |
| 44 | f.write(self.content) |
| 45 | |
| 46 | async def asave(self, path: str) -> None: |
| 47 | await asyncio.to_thread(self.save, path) |
no outgoing calls
no test coverage detected