summaryrefslogtreecommitdiff
path: root/update_pyparsing_timestamp.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2019-10-31 21:10:28 -0700
committerPaul McGuire <ptmcg@users.noreply.github.com>2019-10-31 23:10:28 -0500
commit53d1b4a6f48a53c4c4ec4ac7031362b691c0366d (patch)
tree088ad3cf3561b78a00af4fb2fd474f4a2b8ca70c /update_pyparsing_timestamp.py
parent41752aa52cc97c710474bb2972cceab057b52ad4 (diff)
downloadpyparsing-git-53d1b4a6f48a53c4c4ec4ac7031362b691c0366d.tar.gz
Blacken the project (#141)
Diffstat (limited to 'update_pyparsing_timestamp.py')
-rw-r--r--update_pyparsing_timestamp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/update_pyparsing_timestamp.py b/update_pyparsing_timestamp.py
index 841b8ec..09233fa 100644
--- a/update_pyparsing_timestamp.py
+++ b/update_pyparsing_timestamp.py
@@ -3,15 +3,15 @@ from datetime import datetime
nw = datetime.utcnow()
nowstring = '"%s"' % (nw.strftime("%d %b %Y %X")[:-3] + " UTC")
-print (nowstring)
+print(nowstring)
quoted_time = quotedString()
quoted_time.setParseAction(lambda: nowstring)
version_time = "__versionTime__ = " + quoted_time
-with open('pyparsing.py', encoding='utf-8') as oldpp:
+with open("pyparsing.py", encoding="utf-8") as oldpp:
orig_code = oldpp.read()
new_code = version_time.transformString(orig_code)
-with open('pyparsing.py','w', encoding='utf-8') as newpp:
+with open("pyparsing.py", "w", encoding="utf-8") as newpp:
newpp.write(new_code)