mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Include native Python option in Code node (#18331)
This commit is contained in:
@@ -14,12 +14,15 @@ const commonDescription: INodeProperties = {
|
||||
noDataExpression: true,
|
||||
};
|
||||
|
||||
const PRINT_INSTRUCTION =
|
||||
'Debug by using <code>print()</code> statements and viewing their output in the browser console.';
|
||||
|
||||
export const pythonCodeDescription: INodeProperties[] = [
|
||||
{
|
||||
...commonDescription,
|
||||
displayOptions: {
|
||||
show: {
|
||||
language: ['python'],
|
||||
language: ['python', 'pythonNative'],
|
||||
mode: ['runOnceForAllItems'],
|
||||
},
|
||||
},
|
||||
@@ -28,14 +31,13 @@ export const pythonCodeDescription: INodeProperties[] = [
|
||||
...commonDescription,
|
||||
displayOptions: {
|
||||
show: {
|
||||
language: ['python'],
|
||||
language: ['python', 'pythonNative'],
|
||||
mode: ['runOnceForEachItem'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName:
|
||||
'Debug by using <code>print()</code> statements and viewing their output in the browser console.',
|
||||
displayName: PRINT_INSTRUCTION,
|
||||
name: 'notice',
|
||||
type: 'notice',
|
||||
displayOptions: {
|
||||
@@ -45,4 +47,15 @@ export const pythonCodeDescription: INodeProperties[] = [
|
||||
},
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: `${PRINT_INSTRUCTION}<br><br>The native Python option does not support <code>_</code> syntax and helpers, except for <code>_items</code> and <code>_item</code>.`,
|
||||
name: 'notice',
|
||||
type: 'notice',
|
||||
displayOptions: {
|
||||
show: {
|
||||
language: ['pythonNative'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user