Fixed code smell 'Default parameters should be last' reported by SonarQube.

This commit is contained in:
Akshay Joshi 2022-01-12 18:40:18 +05:30
parent c98fb887cc
commit 4e414f57e6
50 changed files with 72 additions and 72 deletions

View File

@ -10,7 +10,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import { isEmptyString } from 'sources/validators';
export default class CastSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
name: undefined, // Name of the cast
encoding: 'UTF8',

View File

@ -14,7 +14,7 @@ import { isEmptyString } from 'sources/validators';
export default class EventTriggerSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
oid: undefined,
name: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import OptionsSchema from '../../../../../static/js/options.ui';
export default class ForeignServerSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions={}, initValues) {
constructor(getPrivilegeRoleSchema, fieldOptions={}, initValues={}) {
super({
name: undefined,
fsrvtype: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import OptionsSchema from '../../../../../../static/js/options.ui';
export default class UserMappingSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
name: undefined,
is_sys_obj: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import OptionsSchema from '../../../../static/js/options.ui';
export default class ForeignDataWrapperSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions={}, initValues) {
constructor(getPrivilegeRoleSchema, fieldOptions={}, initValues={}) {
super({
name: undefined,
fdwowner: undefined,

View File

@ -13,7 +13,7 @@ import SecLabelSchema from '../../../../static/js/sec_label.ui';
import _ from 'lodash';
export default class LanguageSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions={}, node_info, initValues) {
constructor(getPrivilegeRoleSchema, fieldOptions={}, node_info={}, initValues={}) {
super({
name: undefined,
lanowner: (node_info) ? node_info['node_info'].user.name: undefined,

View File

@ -56,7 +56,7 @@ export class DefaultWithSchema extends BaseUISchema {
}
export default class PublicationSchema extends BaseUISchema {
constructor(fieldOptions={}, node_info, initValues) {
constructor(fieldOptions={}, node_info={}, initValues={}) {
super({
name: undefined,
pubowner: (node_info) ? node_info['node_info'].user.name: undefined,

View File

@ -11,7 +11,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import gettext from 'sources/gettext';
export default class AggregateSchema extends BaseUISchema {
constructor(fieldOptions = {},initValues) {
constructor(fieldOptions = {},initValues={}) {
super({
name: undefined,
oid: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class CatalogObjectColumnSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
attname: undefined,
attowner: undefined,

View File

@ -12,7 +12,7 @@ import gettext from 'sources/gettext';
import { isEmptyString } from 'sources/validators';
export default class CollationSchema extends BaseUISchema {
constructor(fieldOptions = {},initValues) {
constructor(fieldOptions = {},initValues={}) {
super({
name: undefined,
oid: undefined,

View File

@ -67,7 +67,7 @@ export class DomainConstSchema extends BaseUISchema {
}
export default class DomainSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
name: undefined,
oid: undefined,

View File

@ -19,7 +19,7 @@ import { getNodeAjaxOptions } from '../../../../../../../static/js/node_ajax';
export default class ForeignTableSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, getVariableSchema, getColumns, fieldOptions={}, initValues) {
constructor(getPrivilegeRoleSchema, getVariableSchema, getColumns, fieldOptions={}, initValues={}) {
super({
name: undefined,
oid: undefined,

View File

@ -67,7 +67,7 @@ class TokenSchema extends BaseUISchema {
}
export default class FTSConfigurationSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
name: undefined, // FTS Configuration name
owner: undefined, // FTS Configuration owner

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import OptionsSchema from '../../../../../static/js/options.ui';
export default class FTSDictionarySchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
name: undefined, // FTS Dictionary name
owner: undefined, // FTS Dictionary owner

View File

@ -11,7 +11,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class FTSParserSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) {
constructor(fieldOptions = {}, initValues={}) {
super({
name: null,
oid: undefined,

View File

@ -11,7 +11,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class FTSTemplateSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) {
constructor(fieldOptions = {}, initValues={}) {
super({
name: null,
oid: undefined,

View File

@ -94,7 +94,7 @@ export class DefaultArgumentSchema extends BaseUISchema {
}
export default class FunctionSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, getNodeVariableSchema, fieldOptions={}, node_info, type, initValues) {
constructor(getPrivilegeRoleSchema, getNodeVariableSchema, fieldOptions={}, node_info={}, type='function', initValues={}) {
super({
name: undefined,
oid: undefined,

View File

@ -14,7 +14,7 @@ import { isEmptyString } from 'sources/validators';
export default class TriggerFunctionSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, getVariableSchema, fieldOptions={}, initValues) {
constructor(getPrivilegeRoleSchema, getVariableSchema, fieldOptions={}, initValues={}) {
super({
name: null,
oid: null,

View File

@ -11,7 +11,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import gettext from 'sources/gettext';
export default class OperatorSchema extends BaseUISchema {
constructor(fieldOptions = {},initValues) {
constructor(fieldOptions = {},initValues={}) {
super({
name: undefined,
oid: undefined,

View File

@ -11,7 +11,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class EDBFuncSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) {
constructor(fieldOptions = {}, initValues={}) {
super({
name: undefined,
oid: undefined,

View File

@ -11,7 +11,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class EDBVarSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) {
constructor(fieldOptions = {}, initValues={}) {
super({
name: undefined,
oid: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import { isEmptyString } from 'sources/validators';
export default class PackageSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues) {
constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues={}) {
super({
name: undefined,
oid: undefined,

View File

@ -68,7 +68,7 @@ export class OwnedBySchema extends BaseUISchema {
export default class SequenceSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions={}, initValues) {
constructor(getPrivilegeRoleSchema, fieldOptions={}, initValues={}) {
super({
name: undefined,
oid: undefined,

View File

@ -11,7 +11,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class CatalogSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) {
constructor(fieldOptions = {}, initValues={}) {
super({
name: undefined,
namespaceowner: undefined,

View File

@ -14,7 +14,7 @@ import SecLabelSchema from '../../../../static/js/sec_label.ui';
import { isEmptyString } from 'sources/validators';
export default class PGSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues) {
constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues={}) {
super({
name: undefined,
namespaceowner: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import { emptyValidator } from 'sources/validators';
export default class SynonymSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo, initValues) {
constructor(fieldOptions={}, nodeInfo={}, initValues={}) {
super({
targettype: 'r',
...initValues,

View File

@ -13,7 +13,7 @@ import { isEmptyString } from 'sources/validators';
export class ForEventsSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo, initValues) {
constructor(fieldOptions={}, nodeInfo={}, initValues={}) {
super({
...initValues,
});
@ -73,7 +73,7 @@ export class ForEventsSchema extends BaseUISchema {
}
export default class CompoundTriggerSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo, initValues) {
constructor(fieldOptions={}, nodeInfo={}, initValues={}) {
super({
name: undefined,
...initValues,

View File

@ -186,7 +186,7 @@ class ExclusionColumnSchema extends BaseUISchema {
}
export default class ExclusionConstraintSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo) {
constructor(fieldOptions={}, nodeInfo={}) {
super({
name: undefined,
oid: undefined,

View File

@ -118,7 +118,7 @@ export class ForeignKeyColumnSchema extends BaseUISchema {
}
export default class ForeignKeySchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo, getColumns, initValues={}, inErd=false) {
constructor(fieldOptions={}, nodeInfo={}, getColumns=()=>[], initValues={}, inErd=false) {
super({
name: undefined,
reftab: undefined,

View File

@ -5,7 +5,7 @@ import { isEmptyString } from 'sources/validators';
import { SCHEMA_STATE_ACTIONS } from '../../../../../../../../../../static/js/SchemaView';
import TableSchema from '../../../../static/js/table.ui';
export default class PrimaryKeySchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo) {
constructor(fieldOptions={}, nodeInfo={}) {
super({
name: undefined,
oid: undefined,

View File

@ -6,7 +6,7 @@ import { SCHEMA_STATE_ACTIONS } from '../../../../../../../../../../static/js/Sc
import TableSchema from '../../../../static/js/table.ui';
export default class UniqueConstraintSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo) {
constructor(fieldOptions={}, nodeInfo={}) {
super({
name: undefined,
oid: undefined,

View File

@ -27,7 +27,7 @@ export function getColumnSchema(nodeObj, treeNodeInfo, itemNodeData) {
}
export class ColumnSchema extends BaseUISchema {
constructor(fieldOptions = {}, nodeData, initValues) {
constructor(fieldOptions = {}, nodeData, initValues={}) {
super({
name: null,
oid: undefined,
@ -209,7 +209,7 @@ function inSchema(node_info) {
}
export default class IndexSchema extends BaseUISchema {
constructor(getColumnSchema, fieldOptions = {}, nodeData, initValues) {
constructor(getColumnSchema, fieldOptions = {}, nodeData, initValues={}) {
super({
name: undefined,
oid: undefined,

View File

@ -72,8 +72,8 @@ export function getNodePartitionTableSchema(treeNodeInfo, itemNodeData, pgBrowse
}
export default class PartitionTableSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo, schemas, getPrivilegeRoleSchema, getColumns,
getCollations, getOperatorClass, getAttachTables, initValues) {
constructor(fieldOptions={}, nodeInfo={}, schemas={}, getPrivilegeRoleSchema={}, getColumns=()=>[],
getCollations=()=>[], getOperatorClass=()=>[], getAttachTables=()=>[], initValues={}) {
super({
name: undefined,
oid: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class RowSecurityPolicySchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
name: undefined,
policyowner: 'public',

View File

@ -284,7 +284,7 @@ export class LikeSchema extends BaseUISchema {
}
export default class TableSchema extends BaseUISchema {
constructor(fieldOptions={}, nodeInfo, schemas={}, getPrivilegeRoleSchema=()=>{/*This is intentional (SonarQube)*/}, getColumns=()=>[],
constructor(fieldOptions={}, nodeInfo={}, schemas={}, getPrivilegeRoleSchema=()=>{/*This is intentional (SonarQube)*/}, getColumns=()=>[],
getCollations=()=>[], getOperatorClass=()=>[], getAttachTables=()=>[], initValues={}, inErd=false) {
super({
name: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import { isEmptyString } from 'sources/validators';
export class EventSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
evnt_update: false,
evnt_insert: false,
@ -119,7 +119,7 @@ export class EventSchema extends BaseUISchema {
export default class TriggerSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
name: undefined,
is_row_trigger: true,

View File

@ -173,7 +173,7 @@ class EnumerationSchema extends BaseUISchema {
}
class RangeSchema extends BaseUISchema {
constructor(fieldOptions = {}, node_info, initValues) {
constructor(fieldOptions = {}, node_info={}, initValues={}) {
super({
typname: null,
oid: undefined,
@ -412,7 +412,7 @@ class RangeSchema extends BaseUISchema {
}
class ExternalSchema extends BaseUISchema {
constructor(fieldOptions = {}, node_info, initValues) {
constructor(fieldOptions = {}, node_info={}, initValues={}) {
super({
name: null,
typinput: undefined,
@ -872,7 +872,7 @@ class ExternalSchema extends BaseUISchema {
}
class CompositeSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) {
constructor(fieldOptions = {}, initValues={}) {
super({
oid: undefined,
is_sys_type: false,
@ -1065,7 +1065,7 @@ class CompositeSchema extends BaseUISchema {
class DataTypeSchema extends BaseUISchema {
constructor(fieldOptions = {}, initValues) {
constructor(fieldOptions = {}, initValues={}) {
super({
oid: undefined,
is_sys_type: false,
@ -1271,7 +1271,7 @@ class DataTypeSchema extends BaseUISchema {
}
export default class TypeSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, getCompositeSchema, getRangeSchema, getExternalSchema, getDataTypeSchema, fieldOptions = {}, initValues) {
constructor(getPrivilegeRoleSchema, getCompositeSchema, getRangeSchema, getExternalSchema, getDataTypeSchema, fieldOptions = {}, initValues={}) {
super({
name: null,
oid: undefined,

View File

@ -14,7 +14,7 @@ import { isEmptyString } from 'sources/validators';
export default class MViewSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, getVacuumSettingsSchema, fieldOptions={}, initValues) {
constructor(getPrivilegeRoleSchema, getVacuumSettingsSchema, fieldOptions={}, initValues={}) {
super({
spcname: undefined,
toast_autovacuum_enabled: 'x',

View File

@ -14,7 +14,7 @@ import { isEmptyString } from 'sources/validators';
export default class ViewSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, nodeInfo, fieldOptions={}, initValues) {
constructor(getPrivilegeRoleSchema, nodeInfo, fieldOptions={}, initValues={}) {
super({
owner: undefined,
schema: undefined,

View File

@ -47,7 +47,7 @@ export class DefaultPrivSchema extends BaseUISchema {
}
export default class DatabaseSchema extends BaseUISchema {
constructor(getVariableSchema, getPrivilegeRoleSchema, fieldOptions={}, initValues) {
constructor(getVariableSchema, getPrivilegeRoleSchema, fieldOptions={}, initValues={}) {
super({
name: undefined,
owner: undefined,

View File

@ -12,7 +12,7 @@ import { isEmptyString } from 'sources/validators';
import _ from 'lodash';
export default class SubscriptionSchema extends BaseUISchema{
constructor(fieldOptions={}, node_info, initValues) {
constructor(fieldOptions={}, node_info={}, initValues={}) {
super({
name: undefined,
subowner: undefined,

View File

@ -74,7 +74,7 @@ const weekdays = [
];
export class ExceptionsSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
jexdate: null,
jextime: null,
@ -159,7 +159,7 @@ const BooleanArrayFormatter = {
};
export class DaysSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
...initValues,
});
@ -201,7 +201,7 @@ export class DaysSchema extends BaseUISchema {
}
export class TimesSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
...initValues,
});
@ -235,7 +235,7 @@ export class TimesSchema extends BaseUISchema {
}
export default class PgaJobScheduleSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
jscid: null,
jscjobid: null,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import PgaJobScheduleSchema from '../../schedules/static/js/pga_schedule.ui';
export default class PgaJobSchema extends BaseUISchema {
constructor(fieldOptions={}, getPgaJobStepSchema, initValues) {
constructor(fieldOptions={}, getPgaJobStepSchema=()=>[], initValues={}) {
super({
jobname: '',
jobid: undefined,

View File

@ -26,7 +26,7 @@ export function getNodePgaJobStepSchema(treeNodeInfo, itemNodeData) {
);
}
export default class PgaJobStepSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
jstid: null,
jstjobid: null,

View File

@ -19,7 +19,7 @@ import current_user from 'pgadmin.user_management.current_user';
import { isEmptyString } from 'sources/validators';
export default class ServerSchema extends BaseUISchema {
constructor(serverGroupOptions=[], userId, initValues) {
constructor(serverGroupOptions=[], userId, initValues={}) {
super({
gid: undefined,
id: undefined,

View File

@ -12,7 +12,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import SecLabelSchema from '../../../static/js/sec_label.ui';
export default class TablespaceSchema extends BaseUISchema {
constructor(getVariableSchema, getPrivilegeRoleSchema, fieldOptions={}, initValues) {
constructor(getVariableSchema, getPrivilegeRoleSchema, fieldOptions={}, initValues={}) {
super({
name: undefined,
owner: undefined,

View File

@ -11,7 +11,7 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import { isEmptyString } from 'sources/validators';
export class SectionSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
...initValues,
});
@ -131,7 +131,7 @@ export function getTypeObjSchema(fieldOptions) {
}
export class SaveOptSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
id: null,
...initValues,
@ -194,7 +194,7 @@ export function getSaveOptSchema(fieldOptions) {
}
export class QueryOptionSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
id: null,
...initValues,
@ -274,7 +274,7 @@ export function getQueryOptionSchema(fieldOptions) {
}
export class DisabledOptionSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
id: null,
...initValues,
@ -316,7 +316,7 @@ export function getDisabledOptionSchema(fieldOptions) {
}
export class MiscellaneousSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
id: null,
verbose: true,

View File

@ -2,7 +2,7 @@ import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class PrivilegeSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues) {
constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues={}) {
super({
oid: null,
privilege: [],

View File

@ -136,7 +136,7 @@ export function getRestoreTypeObjSchema(fieldOptions) {
}
export class RestoreSaveOptSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
id: null,
...initValues,
@ -192,7 +192,7 @@ export function getRestoreSaveOptSchema(fieldOptions) {
}
export class RestoreQueryOptionSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
id: null,
...initValues,
@ -245,7 +245,7 @@ export function getRestoreQueryOptionSchema(fieldOptions) {
}
export class RestoreDisableOptionSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
id: null,
...initValues,
@ -284,7 +284,7 @@ export function getRestoreDisableOptionSchema(fieldOptions) {
}
export class RestoreMiscellaneousSchema extends BaseUISchema {
constructor(fieldOptions={}, initValues) {
constructor(fieldOptions={}, initValues={}) {
super({
id: null,
verbose: true,

View File

@ -76,9 +76,9 @@ RECORD_ARRAY = (2287,)
#
# For below two sql psycopg2 returns result in different formats.
# SELECT '{foo,bar}'::text[];
# print('type of {} ==> {/*This is intentional (SonarQube)*/}'.format(res[0], type(res[0])))
# print('type of {} ==> {}'.format(res[0], type(res[0])))
# SELECT '{<a>foo</a>,<b>bar</b>}'::xml[];
# print('type of {} ==> {/*This is intentional (SonarQube)*/}'.format(res[0], type(res[0])))
# print('type of {} ==> {}'.format(res[0], type(res[0])))
#
# Output:
# type of ['foo', 'bar'] ==> <type 'list'>