8 Commits

Author SHA1 Message Date
Hannes
1877b3634a Show full traceback on Python expression function exception 2022-02-19 09:00:34 +10:00
Matthias Kuhn
a5f557f085 Fix escaping issues 2020-05-05 23:22:12 +02:00
Juergen E. Fischer
b830a4a448 qgsfunction: replace deprecated inspect.getargspec() to inspect.getfullargspec() 2019-11-07 22:47:08 +01:00
Matthias Kuhn
a1b6a2cb7f Fix docs 2018-07-02 06:16:49 -05:00
Matthias Kuhn
45fdd0fb31 Add documentation for @qgsfunction 2018-07-01 06:31:26 -05:00
Matthias Kuhn
60730abba7 Add missing import 2018-06-30 09:40:13 -05:00
Matthias Kuhn
773138cf57 Add handlesnull parameter to @qgsfunction
Up to date it was not possible to create a function that handles NULL values with the
@qgsfunction decorator. As soon as any parameter was NULL, the return value would also
be NULL.

Example of a function that returns a value now with a NULL paramter and would have returned NULL before

```
@qgsfunction(args=-1, group='Custom', handlesnull=True)
def mean_value(vals, feature, parent):
    valid_vals = [val for val in vals if val != NULL]
    return sum(valid_vals)/len(valid_vals)
```

[FEATURE]
2018-06-30 09:40:13 -05:00
Denis Rouzaud
6e33bdcdc4 [pyqgis] move qgis.core tricks to their own python file in additions folder
this makes the code much easier to read
2018-05-14 18:00:39 -04:00