-
-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
Semgrep scan identified:
1/ Files opened without corresponding close
2/ Missing encoding parameter in file open call
bids/elf_utils.py
❯❯❱ semgrep.python.lang.best-practice.open-never-closed
file object opened without corresponding close
29┆ f = open(file, "rb")
bids/library.py
❯❯❱ semgrep.python.lang.best-practice.open-never-closed
file object opened without corresponding close
64┆ f = open(cache)
❯❱ semgrep.python.lang.best-practice.unspecified-open-encoding
Missing 'encoding' parameter. 'open()' uses device locale encodings by default, corrupting files
with special characters. Specify the encoding to ensure cross-platform support when opening files in
text mode (e.g. encoding="utf-8").
64┆ f = open(cache)
bids/output.py
❯❯❱ semgrep.python.lang.best-practice.open-never-closed
file object opened without corresponding close
22┆ self.file_handle = open(filename, "w", encoding="utf-8")
Affected files
- elf_utils.py
- library.py
- output.py
Metadata
Metadata
Assignees
Labels
No labels