chore: cleanup ruff flake8-simplify linter rules (#8286)
Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
0bb7569d46
commit
0f14873255
34 changed files with 108 additions and 136 deletions
|
|
@ -48,7 +48,8 @@ class WordExtractor(BaseExtractor):
|
|||
raise ValueError(f"Check the url of your file; returned status code {r.status_code}")
|
||||
|
||||
self.web_path = self.file_path
|
||||
self.temp_file = tempfile.NamedTemporaryFile()
|
||||
# TODO: use a better way to handle the file
|
||||
self.temp_file = tempfile.NamedTemporaryFile() # noqa: SIM115
|
||||
self.temp_file.write(r.content)
|
||||
self.file_path = self.temp_file.name
|
||||
elif not os.path.isfile(self.file_path):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue