mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Apply codestyle checks to all Python code.
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import fileinput
|
||||
import sys, getopt
|
||||
import getopt
|
||||
import sys
|
||||
|
||||
# Store input and output file names
|
||||
infile=''
|
||||
outfile=''
|
||||
searchExp=''
|
||||
replaceExp=''
|
||||
infile = ''
|
||||
outfile = ''
|
||||
searchExp = ''
|
||||
replaceExp = ''
|
||||
|
||||
# Read command line args
|
||||
myopts, args = getopt.getopt(sys.argv[1:],"i:o:s:r:")
|
||||
myopts, args = getopt.getopt(sys.argv[1:], "i:o:s:r:")
|
||||
|
||||
###############################
|
||||
# o == option
|
||||
@@ -16,13 +16,13 @@ myopts, args = getopt.getopt(sys.argv[1:],"i:o:s:r:")
|
||||
###############################
|
||||
for o, a in myopts:
|
||||
if o == '-i':
|
||||
infile=a
|
||||
infile = a
|
||||
elif o == '-o':
|
||||
outfile=a
|
||||
outfile = a
|
||||
elif o == '-s':
|
||||
searchExp=a
|
||||
searchExp = a
|
||||
elif o == '-r':
|
||||
replaceExp=a
|
||||
replaceExp = a
|
||||
else:
|
||||
print("Usage: %s -i input -o output" % sys.argv[0])
|
||||
|
||||
@@ -31,6 +31,6 @@ for o, a in myopts:
|
||||
f1 = open(infile, 'r')
|
||||
f2 = open(outfile, 'w')
|
||||
for line in f1:
|
||||
f2.write(line.replace(searchExp,replaceExp))
|
||||
f2.write(line.replace(searchExp, replaceExp))
|
||||
f1.close()
|
||||
f2.close()
|
||||
|
||||
Reference in New Issue
Block a user