expr-codegen 0.10.8__tar.gz → 0.10.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/PKG-INFO +1 -1
- expr_codegen-0.10.9/expr_codegen/_version.py +1 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/codes.py +4 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen.egg-info/PKG-INFO +1 -1
- expr_codegen-0.10.8/expr_codegen/_version.py +0 -1
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/LICENSE +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/README.md +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/__init__.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/dag.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/expr.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/latex/__init__.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/latex/printer.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/model.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/pandas/__init__.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/pandas/code.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/pandas/helper.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/pandas/printer.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/pandas/ta.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/pandas/template.py.j2 +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/polars_group/__init__.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/polars_group/code.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/polars_group/printer.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/polars_group/template.py.j2 +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/polars_over/__init__.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/polars_over/code.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/polars_over/printer.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/polars_over/template.py.j2 +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen/tool.py +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen.egg-info/SOURCES.txt +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen.egg-info/dependency_links.txt +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen.egg-info/requires.txt +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/expr_codegen.egg-info/top_level.txt +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/pyproject.toml +0 -0
- {expr_codegen-0.10.8 → expr_codegen-0.10.9}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.10.9"
|
|
@@ -2,6 +2,7 @@ import ast
|
|
|
2
2
|
import re
|
|
3
3
|
from ast import expr
|
|
4
4
|
|
|
5
|
+
from black import Mode, format_str
|
|
5
6
|
from sympy import Add, Mul, Pow, Eq, Not, Xor
|
|
6
7
|
|
|
7
8
|
from expr_codegen.expr import register_symbols, dict_to_exprs
|
|
@@ -316,6 +317,9 @@ def source_replace(source: str) -> str:
|
|
|
316
317
|
# break
|
|
317
318
|
# 或、与
|
|
318
319
|
source = source.replace('||', '|').replace('&&', '&')
|
|
320
|
+
# IndentationError: unexpected indent
|
|
321
|
+
# 嵌套函数前有空格,会报错
|
|
322
|
+
source = format_str(source, mode=Mode(line_length=600, magic_trailing_comma=True))
|
|
319
323
|
return source
|
|
320
324
|
|
|
321
325
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.10.8"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|