This repository was archived by the owner on Mar 31, 2025. It is now read-only.
Commit 5e06ce5
committed
Fix
Using `open()` without explicitly closing the handle is not a best
practice. Use `open()` as a context manager so that handles will be
closed immediately after their contents are read.
This silences a warning that appears when running with
`PYTHONWARNINGS=always` (or `python -Wd ...`)ResourceWarning: unclosed file
1 parent b62c77e commit 5e06ce5
2 files changed
+9
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | | - | |
| 2 | + | |
5 | 3 | | |
6 | | - | |
| 4 | + | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | | - | |
| 8 | + | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
0 commit comments