Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #235

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exclude: ^python/tests/__snapshots__/
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.3
rev: v0.8.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
18 changes: 9 additions & 9 deletions python/egglog/builtins.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@


__all__ = [
"i64",
"i64Like",
"f64",
"f64Like",
"Bool",
"BoolLike",
"String",
"StringLike",
"Map",
"PyObject",
"Rational",
"Set",
"String",
"StringLike",
"UnstableFn",
"Vec",
"f64",
"f64Like",
"i64",
"i64Like",
"join",
"PyObject",
"py_eval",
"py_exec",
"py_eval_fn",
"UnstableFn",
"py_exec",
]


Expand Down
2 changes: 1 addition & 1 deletion python/egglog/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from .egraph import Expr

__all__ = ["convert", "converter", "resolve_literal", "convert_to_same_type"]
__all__ = ["convert", "convert_to_same_type", "converter", "resolve_literal"]
# Mapping from (source type, target type) to and function which takes in the runtimes values of the source and return the target
TypeName = NewType("TypeName", str)
CONVERSIONS: dict[tuple[type | TypeName, TypeName], tuple[int, Callable]] = {}
Expand Down
94 changes: 47 additions & 47 deletions python/egglog/declarations.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,65 +17,65 @@


__all__ = [
"replace_typed_expr",
"ActionCommandDecl",
"ActionDecl",
"BiRewriteDecl",
"CallDecl",
"CallableDecl",
"CallableRef",
"ChangeDecl",
"ClassDecl",
"ClassMethodRef",
"ClassTypeVarRef",
"ClassVariableRef",
"CombinedRulesetDecl",
"CommandDecl",
"ConstantDecl",
"ConstantRef",
"Declarations",
"Declarations",
"DeclerationsLike",
"DefaultRewriteDecl",
"DelayedDeclerations",
"upcast_declerations",
"Declarations",
"EqDecl",
"ExprActionDecl",
"ExprDecl",
"ExprFactDecl",
"FactDecl",
"FunctionDecl",
"FunctionRef",
"FunctionSignature",
"HasDeclerations",
"InitRef",
"JustTypeRef",
"ClassTypeVarRef",
"TypeRefWithVars",
"TypeOrVarRef",
"LetDecl",
"LitDecl",
"LitType",
"MethodRef",
"ClassMethodRef",
"FunctionRef",
"UnnamedFunctionRef",
"ConstantRef",
"ClassVariableRef",
"PanicDecl",
"PartialCallDecl",
"PropertyRef",
"CallableRef",
"FunctionDecl",
"RelationDecl",
"ConstantDecl",
"CallableDecl",
"VarDecl",
"PyObjectDecl",
"PartialCallDecl",
"LitType",
"LitDecl",
"CallDecl",
"ExprDecl",
"TypedExprDecl",
"ClassDecl",
"RulesetDecl",
"CombinedRulesetDecl",
"SaturateDecl",
"RelationDecl",
"RepeatDecl",
"SequenceDecl",
"RewriteDecl",
"RewriteOrRuleDecl",
"RuleDecl",
"RulesetDecl",
"RunDecl",
"SaturateDecl",
"ScheduleDecl",
"EqDecl",
"ExprFactDecl",
"FactDecl",
"LetDecl",
"SequenceDecl",
"SetDecl",
"ExprActionDecl",
"ChangeDecl",
"UnionDecl",
"PanicDecl",
"ActionDecl",
"RewriteDecl",
"BiRewriteDecl",
"RuleDecl",
"RewriteOrRuleDecl",
"ActionCommandDecl",
"CommandDecl",
"SpecialFunctions",
"FunctionSignature",
"DefaultRewriteDecl",
"InitRef",
"HasDeclerations",
"TypeOrVarRef",
"TypeRefWithVars",
"TypedExprDecl",
"UnionDecl",
"UnnamedFunctionRef",
"VarDecl",
"replace_typed_expr",
"upcast_declerations",
]


Expand Down
70 changes: 35 additions & 35 deletions python/egglog/egraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,53 +42,53 @@


__all__ = [
"Action",
"Command",
"Command",
"EGraph",
"Module",
"function",
"ruleset",
"method",
"relation",
"Expr",
"Fact",
"Fact",
"GraphvizKwargs",
"Module",
"RewriteOrRule",
"Ruleset",
"Schedule",
"Unit",
"rewrite",
"_BirewriteBuilder",
"_EqBuilder",
"_NeBuilder",
"_RewriteBuilder",
"_SetBuilder",
"_UnionBuilder",
"action_command",
"birewrite",
"eq",
"ne",
"panic",
"let",
"check",
"check_eq",
"constant",
"delete",
"subsume",
"union",
"set_",
"rule",
"var",
"vars_",
"Fact",
"expr_parts",
"eq",
"expr_action",
"expr_fact",
"action_command",
"Schedule",
"expr_parts",
"function",
"let",
"method",
"ne",
"panic",
"relation",
"rewrite",
"rule",
"ruleset",
"run",
"seq",
"Command",
"set_",
"simplify",
"subsume",
"union",
"unstable_combine_rulesets",
"check",
"GraphvizKwargs",
"Ruleset",
"_RewriteBuilder",
"_BirewriteBuilder",
"_EqBuilder",
"_NeBuilder",
"_SetBuilder",
"_UnionBuilder",
"RewriteOrRule",
"Fact",
"Action",
"Command",
"check_eq",
"var",
"vars_",
]

T = TypeVar("T")
Expand Down
2 changes: 1 addition & 1 deletion python/egglog/egraph_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
if TYPE_CHECKING:
from collections.abc import Iterable

__all__ = ["EGraphState", "GLOBAL_PY_OBJECT_SORT"]
__all__ = ["GLOBAL_PY_OBJECT_SORT", "EGraphState"]

# Create a global sort for python objects, so we can store them without an e-graph instance
# Needed when serializing commands to egg commands when creating modules
Expand Down
4 changes: 2 additions & 2 deletions python/egglog/pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@


__all__ = [
"pretty_decl",
"pretty_callable_ref",
"BINARY_METHODS",
"UNARY_METHODS",
"pretty_callable_ref",
"pretty_decl",
]
MAX_LINE_LENGTH = 110
LINE_DIFFERENCE = 10
Expand Down
6 changes: 3 additions & 3 deletions python/egglog/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@

__all__ = [
"LIT_CLASS_NAMES",
"resolve_callable",
"resolve_type_annotation",
"REFLECTED_BINARY_METHODS",
"RuntimeClass",
"RuntimeExpr",
"RuntimeFunction",
"REFLECTED_BINARY_METHODS",
"resolve_callable",
"resolve_type_annotation",
]


Expand Down
2 changes: 1 addition & 1 deletion python/egglog/type_constraint_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from collections.abc import Collection, Iterable


__all__ = ["TypeConstraintSolver", "TypeConstraintError"]
__all__ = ["TypeConstraintError", "TypeConstraintSolver"]


class TypeConstraintError(RuntimeError):
Expand Down