Skip to content

Commit

Permalink
Lint check & fix to python3 format (#18)
Browse files Browse the repository at this point in the history
* lint check and change files from python2 to python3

* pre-commit check for these files
  • Loading branch information
stevenhua0320 authored Jul 29, 2024
1 parent 3705663 commit 5684c18
Show file tree
Hide file tree
Showing 7 changed files with 834 additions and 547 deletions.
8 changes: 4 additions & 4 deletions devutils/makesdist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ sys.path.insert(0, BASEDIR)
from setup import versiondata
timestamp = versiondata.getint('DEFAULT', 'timestamp')

print 'Run "setup.py sdist --formats=tar"',
print('Run "setup.py sdist --formats=tar"',)
cmd_sdist = [sys.executable] + 'setup.py sdist --formats=tar'.split()
ec = subprocess.call(cmd_sdist, cwd=BASEDIR, stdout=open(os.devnull, 'w'))
if ec: sys.exit(ec)
print "[done]"
print("[done]")

tarname = max(glob.glob(BASEDIR + '/dist/*.tar'), key=os.path.getmtime)

Expand All @@ -36,8 +36,8 @@ def fixtarinfo(tinfo):
return tinfo


print 'Filter %s --> %s.gz' % (2 * (os.path.basename(tarname),)),
print('Filter %s --> %s.gz' % (2 * (os.path.basename(tarname),)),)
for ti in tfin:
tfout.addfile(fixtarinfo(ti), tfin.extractfile(ti))
os.remove(tarname)
print "[done]"
print("[done]")
2 changes: 0 additions & 2 deletions devutils/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,3 @@ def rm(directory, filerestr):
print "==== Scrubbing Endlines ===="
# All *.srmise and *.pwa files in examples directory.
scrubeol("../doc/examples/output", r".*(\.srmise|\.pwa)")


Loading

0 comments on commit 5684c18

Please sign in to comment.