| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ddd6329 commit 3dc73ae
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -170,7 +170,7 @@ def reset(self): | |||
| 170 | 170 | ||
| 171 | 171 | def load(self, filename, encoding): | |
| 172 | 172 | with open( | |
| 173 | - filename, "r", encoding=encoding, errors="ignore" | ||
| 173 | + filename, encoding=encoding, errors="ignore" | ||
| 174 | 174 | ) as hfile: | |
| 175 | 175 | with FileLock(hfile, filename=filename): | |
| 176 | 176 | self.entries = self.load_from(hfile) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -331,7 +331,7 @@ def get_encoding(obj): | |||
| 331 | 331 | ||
| 332 | 332 | def get_encoding_file(fname): | |
| 333 | 333 | """Try to obtain encoding information from a Python source file.""" | |
| 334 | - with open(fname, "rt", encoding="ascii", errors="ignore") as f: | ||
| 334 | + with open(fname, encoding="ascii", errors="ignore") as f: | ||
| 335 | 335 | for unused in range(2): | |
| 336 | 336 | line = f.readline() | |
| 337 | 337 | match = get_encoding_line_re.search(line) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -480,7 +480,7 @@ def startup(self): | |||
| 480 | 480 | filename = os.environ.get("PYTHONSTARTUP") | |
| 481 | 481 | if filename: | |
| 482 | 482 | encoding = inspection.get_encoding_file(filename) | |
| 483 | - with open(filename, "rt", encoding=encoding) as f: | ||
| 483 | + with open(filename, encoding=encoding) as f: | ||
| 484 | 484 | source = f.read() | |
| 485 | 485 | self.interp.runsource(source, filename, "exec", encode=False) | |
| 486 | 486 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments