Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mode paramter #443

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _read_doc():
Parse docstring from file 'pefile.py' and avoid importing
this module directly.
"""
with open("pefile.py", "r", encoding="utf-8") as f:
with open("pefile.py", encoding="utf-8") as f:
tree = ast.parse(f.read())
return ast.get_docstring(tree)

Expand All @@ -31,7 +31,7 @@ def _read_attr(attr_name):
__version__, __author__, __contact__,
"""
regex = attr_name + r"\s+=\s+['\"](.+)['\"]"
with open("pefile.py", "r", encoding="utf-8") as f:
with open("pefile.py", encoding="utf-8") as f:
match = re.search(regex, f.read())
# Second item in the group is the value of attribute.
return match.group(1)
Expand Down
Loading