|
1 | | -# MIT License |
2 | | - |
3 | | -# Copyright (c) 2022 Yaroslav Polyakov |
4 | | - |
| 1 | +# Copyright 2022 Yaroslav Polyakov |
| 2 | +# |
5 | 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
6 | 4 | # of this software and associated documentation files (the "Software"), to deal |
7 | 5 | # in the Software without restriction, including without limitation the rights |
8 | 6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
9 | 7 | # copies of the Software, and to permit persons to whom the Software is |
10 | 8 | # furnished to do so, subject to the following conditions: |
11 | | - |
12 | | -# The above copyright notice and this permission notice shall be included in all |
13 | | -# copies or substantial portions of the Software. |
14 | | - |
| 9 | +# |
| 10 | +# The above copyright notice and this permission notice shall be included in |
| 11 | +# all copies or substantial portions of the Software. |
| 12 | +# |
15 | 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
16 | 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
17 | | -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
18 | | -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 15 | +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 16 | +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
19 | 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
20 | | -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
21 | | -# SOFTWARE. |
| 18 | +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 19 | +# THE SOFTWARE. |
| 20 | + |
22 | 21 |
|
23 | 22 | """Safe user-supplied python expression evaluation.""" |
24 | 23 |
|
@@ -131,6 +130,7 @@ def generic_visit(self, node): |
131 | 130 |
|
132 | 131 |
|
133 | 132 | class Expr(): |
| 133 | + |
134 | 134 | def __init__(self, expr, model=None, filename=None): |
135 | 135 |
|
136 | 136 | self.expr = expr |
|
0 commit comments