Fixed the errors, and warnings reported by pylama.

TODO::
- Don't use unicode in Python 3 for removing the support of Python 2 (
  psycopg2 driver - __init__.py, server_manager.py).
- Merge the lastest pgcli (version: 3.0.0) for SQL autocompletion.
This commit is contained in:
Ashesh Vashi
2020-05-08 14:13:32 +05:30
parent 9338bdcb3a
commit e73e2d2502
10 changed files with 43 additions and 49 deletions

View File

@@ -13,7 +13,7 @@ import simplejson as json
from functools import wraps
import pgadmin.browser.server_groups.servers.databases as database
from flask import render_template, make_response, request, jsonify
from flask import render_template, request, jsonify
from flask_babelex import gettext
from pgadmin.browser.server_groups.servers.databases.schemas.tables.\
constraints.type import ConstraintRegistry, ConstraintTypeModule
@@ -517,7 +517,7 @@ class ForeignKeyConstraintView(PGChildNodeView):
return make_json_response(
status=400,
success=0,
errormsg=_(
errormsg=gettext(
"Could not find required parameter ({})."
).format(arg)
)
@@ -525,7 +525,7 @@ class ForeignKeyConstraintView(PGChildNodeView):
return make_json_response(
status=400,
success=0,
errormsg=_(
errormsg=gettext(
"Could not find required parameter ({})."
).format(arg)
)

View File

@@ -11,10 +11,11 @@ import os
from pgadmin.utils.driver import DriverRegistry
from regression.python_test_utils.template_helper import file_as_template
DriverRegistry.load_drivers()
from pgadmin.utils.route import BaseTestGenerator
from regression.python_test_utils import test_utils
DriverRegistry.load_drivers()
class TestColumnForeignKeyGetConstraintCols(BaseTestGenerator):
scenarios = [