10000 Fix ResourceWarning: unclosed file in setup.py · mxr/python-prompt-toolkit@73b999f · GitHub
[go: up one dir, main page]

Skip to content

Commit 73b999f

Browse files
BoboTiGjonathanslenders
authored andcommitted
Fix ResourceWarning: unclosed file in setup.py
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
1 parent 2ce5e76 commit 73b999f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

setup.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@
44
from setuptools import setup, find_packages
55

66

7-
long_description = open(
8-
os.path.join(
9-
os.path.dirname(__file__),
10-
'README.rst'
11-
)
12-
).read()
7+
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
8+
long_description = f.read()
139

1410

1511
def get_version(package):

0 commit comments

Comments
 (0)
0