Skip to content

Commit

Permalink
add deleted exception
Browse files Browse the repository at this point in the history
  • Loading branch information
fiddlersfan authored and nyalldawson committed May 16, 2021
1 parent 37a34b5 commit d175318
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/process_function_template.py
Expand Up @@ -4,6 +4,7 @@
import os
import json
import glob
from copy import deepcopy

sys.path.append(
os.path.join(
Expand Down Expand Up @@ -75,6 +76,9 @@ def quote(v):
for v in json_params['variants']:
if 'arguments' not in v:
raise BaseException("%s: arguments expected for operator" % f)
a_list = list(deepcopy(v['arguments']))
if not 1 <= len(a_list) <= 2:
raise BaseException("%s: 1 or 2 arguments expected for operator found %i" % (f, len(a_list)))

cpp.write("\n\n functionHelpTexts().insert( QStringLiteral( {0} ),\n Help( QStringLiteral( {0} ), tr( \"{1}\" ), tr( \"{2}\" ),\n QList<HelpVariant>()".format(
name, json_params['type'], json_params['description'])
Expand Down

0 comments on commit d175318

Please sign in to comment.