Skip to content

Commit 428b018

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 1997a99 commit 428b018

File tree

8 files changed

+99
-99
lines changed

8 files changed

+99
-99
lines changed

python/egglog/builtins.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,24 @@
2222

2323

2424
__all__ = [
25-
"i64",
26-
"i64Like",
27-
"f64",
28-
"f64Like",
2925
"Bool",
3026
"BoolLike",
31-
"String",
32-
"StringLike",
3327
"Map",
28+
"PyObject",
3429
"Rational",
3530
"Set",
31+
"String",
32+
"StringLike",
33+
"UnstableFn",
3634
"Vec",
35+
"f64",
36+
"f64Like",
37+
"i64",
38+
"i64Like",
3739
"join",
38-
"PyObject",
3940
"py_eval",
40-
"py_exec",
4141
"py_eval_fn",
42-
"UnstableFn",
42+
"py_exec",
4343
]
4444

4545

python/egglog/conversion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from .egraph import Expr
1717

18-
__all__ = ["convert", "converter", "resolve_literal", "convert_to_same_type"]
18+
__all__ = ["convert", "convert_to_same_type", "converter", "resolve_literal"]
1919
# Mapping from (source type, target type) to and function which takes in the runtimes values of the source and return the target
2020
TypeName = NewType("TypeName", str)
2121
CONVERSIONS: dict[tuple[type | TypeName, TypeName], tuple[int, Callable]] = {}

python/egglog/declarations.py

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -17,65 +17,65 @@
1717

1818

1919
__all__ = [
20-
"replace_typed_expr",
20+
"ActionCommandDecl",
21+
"ActionDecl",
22+
"BiRewriteDecl",
23+
"CallDecl",
24+
"CallableDecl",
25+
"CallableRef",
26+
"ChangeDecl",
27+
"ClassDecl",
28+
"ClassMethodRef",
29+
"ClassTypeVarRef",
30+
"ClassVariableRef",
31+
"CombinedRulesetDecl",
32+
"CommandDecl",
33+
"ConstantDecl",
34+
"ConstantRef",
35+
"Declarations",
2136
"Declarations",
2237
"DeclerationsLike",
38+
"DefaultRewriteDecl",
2339
"DelayedDeclerations",
24-
"upcast_declerations",
25-
"Declarations",
40+
"EqDecl",
41+
"ExprActionDecl",
42+
"ExprDecl",
43+
"ExprFactDecl",
44+
"FactDecl",
45+
"FunctionDecl",
46+
"FunctionRef",
47+
"FunctionSignature",
48+
"HasDeclerations",
49+
"InitRef",
2650
"JustTypeRef",
27-
"ClassTypeVarRef",
28-
"TypeRefWithVars",
29-
"TypeOrVarRef",
51+
"LetDecl",
52+
"LitDecl",
53+
"LitType",
3054
"MethodRef",
31-
"ClassMethodRef",
32-
"FunctionRef",
33-
"UnnamedFunctionRef",
34-
"ConstantRef",
35-
"ClassVariableRef",
55+
"PanicDecl",
56+
"PartialCallDecl",
3657
"PropertyRef",
37-
"CallableRef",
38-
"FunctionDecl",
39-
"RelationDecl",
40-
"ConstantDecl",
41-
"CallableDecl",
42-
"VarDecl",
4358
"PyObjectDecl",
44-
"PartialCallDecl",
45-
"LitType",
46-
"LitDecl",
47-
"CallDecl",
48-
"ExprDecl",
49-
"TypedExprDecl",
50-
"ClassDecl",
51-
"RulesetDecl",
52-
"CombinedRulesetDecl",
53-
"SaturateDecl",
59+
"RelationDecl",
5460
"RepeatDecl",
55-
"SequenceDecl",
61+
"RewriteDecl",
62+
"RewriteOrRuleDecl",
63+
"RuleDecl",
64+
"RulesetDecl",
5665
"RunDecl",
66+
"SaturateDecl",
5767
"ScheduleDecl",
58-
"EqDecl",
59-
"ExprFactDecl",
60-
"FactDecl",
61-
"LetDecl",
68+
"SequenceDecl",
6269
"SetDecl",
63-
"ExprActionDecl",
64-
"ChangeDecl",
65-
"UnionDecl",
66-
"PanicDecl",
67-
"ActionDecl",
68-
"RewriteDecl",
69-
"BiRewriteDecl",
70-
"RuleDecl",
71-
"RewriteOrRuleDecl",
72-
"ActionCommandDecl",
73-
"CommandDecl",
7470
"SpecialFunctions",
75-
"FunctionSignature",
76-
"DefaultRewriteDecl",
77-
"InitRef",
78-
"HasDeclerations",
71+
"TypeOrVarRef",
72+
"TypeRefWithVars",
73+
"TypedExprDecl",
74+
"UnionDecl",
75+
"UnnamedFunctionRef",
76+
"VarDecl",
77+
"replace_typed_expr",
78+
"upcast_declerations",
7979
]
8080

8181

python/egglog/egraph.py

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -42,53 +42,53 @@
4242

4343

4444
__all__ = [
45+
"Action",
46+
"Command",
47+
"Command",
4548
"EGraph",
46-
"Module",
47-
"function",
48-
"ruleset",
49-
"method",
50-
"relation",
5149
"Expr",
50+
"Fact",
51+
"Fact",
52+
"GraphvizKwargs",
53+
"Module",
54+
"RewriteOrRule",
55+
"Ruleset",
56+
"Schedule",
5257
"Unit",
53-
"rewrite",
58+
"_BirewriteBuilder",
59+
"_EqBuilder",
60+
"_NeBuilder",
61+
"_RewriteBuilder",
62+
"_SetBuilder",
63+
"_UnionBuilder",
64+
"action_command",
5465
"birewrite",
55-
"eq",
56-
"ne",
57-
"panic",
58-
"let",
66+
"check",
67+
"check_eq",
5968
"constant",
6069
"delete",
61-
"subsume",
62-
"union",
63-
"set_",
64-
"rule",
65-
"var",
66-
"vars_",
67-
"Fact",
68-
"expr_parts",
70+
"eq",
6971
"expr_action",
7072
"expr_fact",
71-
"action_command",
72-
"Schedule",
73+
"expr_parts",
74+
"function",
75+
"let",
76+
"method",
77+
"ne",
78+
"panic",
79+
"relation",
80+
"rewrite",
81+
"rule",
82+
"ruleset",
7383
"run",
7484
"seq",
75-
"Command",
85+
"set_",
7686
"simplify",
87+
"subsume",
88+
"union",
7789
"unstable_combine_rulesets",
78-
"check",
79-
"GraphvizKwargs",
80-
"Ruleset",
81-
"_RewriteBuilder",
82-
"_BirewriteBuilder",
83-
"_EqBuilder",
84-
"_NeBuilder",
85-
"_SetBuilder",
86-
"_UnionBuilder",
87-
"RewriteOrRule",
88-
"Fact",
89-
"Action",
90-
"Command",
91-
"check_eq",
90+
"var",
91+
"vars_",
9292
]
9393

9494
T = TypeVar("T")

python/egglog/egraph_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
if TYPE_CHECKING:
2020
from collections.abc import Iterable
2121

22-
__all__ = ["EGraphState", "GLOBAL_PY_OBJECT_SORT"]
22+
__all__ = ["GLOBAL_PY_OBJECT_SORT", "EGraphState"]
2323

2424
# Create a global sort for python objects, so we can store them without an e-graph instance
2525
# Needed when serializing commands to egg commands when creating modules

python/egglog/pretty.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818

1919

2020
__all__ = [
21-
"pretty_decl",
22-
"pretty_callable_ref",
2321
"BINARY_METHODS",
2422
"UNARY_METHODS",
23+
"pretty_callable_ref",
24+
"pretty_decl",
2525
]
2626
MAX_LINE_LENGTH = 110
2727
LINE_DIFFERENCE = 10

python/egglog/runtime.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929

3030
__all__ = [
3131
"LIT_CLASS_NAMES",
32-
"resolve_callable",
33-
"resolve_type_annotation",
32+
"REFLECTED_BINARY_METHODS",
3433
"RuntimeClass",
3534
"RuntimeExpr",
3635
"RuntimeFunction",
37-
"REFLECTED_BINARY_METHODS",
36+
"resolve_callable",
37+
"resolve_type_annotation",
3838
]
3939

4040

python/egglog/type_constraint_solver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from collections.abc import Collection, Iterable
1616

1717

18-
__all__ = ["TypeConstraintSolver", "TypeConstraintError"]
18+
__all__ = ["TypeConstraintError", "TypeConstraintSolver"]
1919

2020

2121
class TypeConstraintError(RuntimeError):

0 commit comments

Comments
 (0)