mirror of https://github.com/dbcli/pgcli
run black again
This commit is contained in:
parent
23eb840ad7
commit
6b2e8df8bd
|
@ -43,7 +43,7 @@ def pgcli_line_magic(line):
|
|||
conn._pgcli = pgcli
|
||||
|
||||
# For convenience, print the connection alias
|
||||
print ("Connected: {}".format(conn.name))
|
||||
print("Connected: {}".format(conn.name))
|
||||
|
||||
try:
|
||||
pgcli.run_cli()
|
||||
|
|
|
@ -36,11 +36,11 @@ def run_step(*args):
|
|||
global DRY_RUN
|
||||
|
||||
cmd = args
|
||||
print (" ".join(cmd))
|
||||
print(" ".join(cmd))
|
||||
if skip_step():
|
||||
print ("--- Skipping...")
|
||||
print("--- Skipping...")
|
||||
elif DRY_RUN:
|
||||
print ("--- Pretending to run...")
|
||||
print("--- Pretending to run...")
|
||||
else:
|
||||
subprocess.check_output(cmd)
|
||||
|
||||
|
@ -99,7 +99,7 @@ if __name__ == "__main__":
|
|||
checklist(checks)
|
||||
|
||||
ver = version("pgcli/__init__.py")
|
||||
print ("Releasing Version:", ver)
|
||||
print("Releasing Version:", ver)
|
||||
|
||||
parser = OptionParser()
|
||||
parser.add_option(
|
||||
|
|
|
@ -48,7 +48,7 @@ def create_cn(hostname, password, username, dbname, port):
|
|||
host=hostname, user=username, database=dbname, password=password, port=port
|
||||
)
|
||||
|
||||
print ("Created connection: {0}.".format(cn.dsn))
|
||||
print("Created connection: {0}.".format(cn.dsn))
|
||||
return cn
|
||||
|
||||
|
||||
|
@ -79,4 +79,4 @@ def close_cn(cn=None):
|
|||
"""
|
||||
if cn:
|
||||
cn.close()
|
||||
print ("Closed connection: {0}.".format(cn.dsn))
|
||||
print("Closed connection: {0}.".format(cn.dsn))
|
||||
|
|
|
@ -29,8 +29,8 @@ def before_all(context):
|
|||
)
|
||||
fixture_dir = os.path.join(context.package_root, "tests/features/fixture_data")
|
||||
|
||||
print ("package root:", context.package_root)
|
||||
print ("fixture dir:", fixture_dir)
|
||||
print("package root:", context.package_root)
|
||||
print("fixture dir:", fixture_dir)
|
||||
|
||||
os.environ["COVERAGE_PROCESS_START"] = os.path.join(
|
||||
context.package_root, ".coveragerc"
|
||||
|
@ -123,14 +123,14 @@ def before_all(context):
|
|||
|
||||
def show_env_changes(env_old, env_new):
|
||||
"""Print out all test-specific env values."""
|
||||
print ("--- os.environ changed values: ---")
|
||||
print("--- os.environ changed values: ---")
|
||||
all_keys = set(list(env_old.keys()) + list(env_new.keys()))
|
||||
for k in sorted(all_keys):
|
||||
old_value = env_old.get(k, "")
|
||||
new_value = env_new.get(k, "")
|
||||
if new_value and old_value != new_value:
|
||||
print ('{}="{}"'.format(k, new_value))
|
||||
print ("-" * 20)
|
||||
print('{}="{}"'.format(k, new_value))
|
||||
print("-" * 20)
|
||||
|
||||
|
||||
def after_all(context):
|
||||
|
@ -181,7 +181,7 @@ def after_scenario(context, scenario):
|
|||
try:
|
||||
context.cli.expect_exact(pexpect.EOF, timeout=15)
|
||||
except pexpect.TIMEOUT:
|
||||
print ("--- after_scenario {}: kill cli".format(scenario.name))
|
||||
print("--- after_scenario {}: kill cli".format(scenario.name))
|
||||
context.cli.kill(signal.SIGKILL)
|
||||
if hasattr(context, "tmpfile_sql_help") and context.tmpfile_sql_help:
|
||||
context.tmpfile_sql_help.close()
|
||||
|
|
|
@ -22,7 +22,7 @@ def read_fixture_files():
|
|||
"""Read all files inside fixture_data directory."""
|
||||
current_dir = os.path.dirname(__file__)
|
||||
fixture_dir = os.path.join(current_dir, "fixture_data/")
|
||||
print ("reading fixture data: {}".format(fixture_dir))
|
||||
print("reading fixture data: {}".format(fixture_dir))
|
||||
fixture_dict = {}
|
||||
for filename in os.listdir(fixture_dir):
|
||||
if filename not in [".", ".."]:
|
||||
|
|
|
@ -3,13 +3,13 @@ import sys
|
|||
|
||||
|
||||
def wrappager(boundary):
|
||||
print (boundary)
|
||||
print(boundary)
|
||||
while 1:
|
||||
buf = sys.stdin.read(2048)
|
||||
if not buf:
|
||||
break
|
||||
sys.stdout.write(buf)
|
||||
print (boundary)
|
||||
print(boundary)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Reference in New Issue