Hi,
PFA minor patch to fix the issue in utils folder.
pycodestyle --config=.pycodestyle ./pgadmin/utils/
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/web/pgadmin/utils/compile_template_name.py
b/web/pgadmin/utils/compile_template_name.py
index 28b5bf8..1e0b94f 100644
--- a/web/pgadmin/utils/compile_template_name.py
+++ b/web/pgadmin/utils/compile_template_name.py
@@ -9,8 +9,12 @@
import os
-def compile_template_name(template_prefix, template_file_name, server_type,
version):
- return os.path.join(compile_template_path(template_prefix, server_type,
version), template_file_name)
+def compile_template_name(
+ template_prefix, template_file_name, server_type, version):
+ return os.path.join(
+ compile_template_path(template_prefix, server_type, version),
+ template_file_name
+ )
def compile_template_path(template_prefix, server_type, version):
diff --git a/web/pgadmin/utils/tests/test_compile_template_name.py
b/web/pgadmin/utils/tests/test_compile_template_name.py
index 97f1b05..b7836cc 100644
--- a/web/pgadmin/utils/tests/test_compile_template_name.py
+++ b/web/pgadmin/utils/tests/test_compile_template_name.py
@@ -12,23 +12,32 @@ from pgadmin.utils.route import BaseTestGenerator
class StartRunningQueryTest(BaseTestGenerator):
"""
- Check that the apply_explain_plan_weapper_if_needed method works as
intended
+ Check that the apply_explain_plan_weapper_if_needed method works as
+ intended
"""
scenarios = [
- ('When server is Postgres and version is 10, it returns the path to
the postgres template', dict(
- server_type='pg',
- version=100000,
-
- expected_return_value='some/prefix/#100000#/some_file.sql'
- )),
- ('When server is GreenPlum and version is 5, it returns the path to
the GreenPlum template', dict(
- server_type='gpdb',
- version=80323,
-
- expected_return_value='some/prefix/#gpdb#80323#/some_file.sql'
- )),
+ (
+ 'When server is Postgres and version is 10, it returns the path '
+ 'to the postgres template',
+ dict(
+ server_type='pg',
+ version=100000,
+ expected_return_value='some/prefix/#100000#/some_file.sql'
+ )
+ ),
+ (
+ 'When server is GreenPlum and version is 5, it returns the path '
+ 'to the GreenPlum template',
+ dict(
+ server_type='gpdb',
+ version=80323,
+ expected_return_value='some/prefix/#gpdb#80323#/some_file.sql'
+ )
+ ),
]
def runTest(self):
- result = compile_template_name('some/prefix', 'some_file.sql',
self.server_type, self.version)
+ result = compile_template_name(
+ 'some/prefix', 'some_file.sql', self.server_type, self.version
+ )
self.assertEquals(result, self.expected_return_value)