Fmt.
This commit is contained in:
parent
dea064ff13
commit
3bedbf7f05
28 changed files with 195 additions and 57 deletions
projects/datalog/src/python/datalog
|
@ -8,9 +8,18 @@ Easy because it's closer to hand, but no simpler.
|
|||
|
||||
from typing import Sequence, Tuple
|
||||
|
||||
from datalog.evaluator import join as __join, select as __select
|
||||
from datalog.evaluator import (
|
||||
join as __join,
|
||||
select as __select,
|
||||
)
|
||||
from datalog.reader import read as __read
|
||||
from datalog.types import Constant, Dataset, LTuple, LVar, PartlyIndexedDataset
|
||||
from datalog.types import (
|
||||
Constant,
|
||||
Dataset,
|
||||
LTuple,
|
||||
LVar,
|
||||
PartlyIndexedDataset,
|
||||
)
|
||||
|
||||
|
||||
def read(text: str, db_cls=PartlyIndexedDataset):
|
||||
|
|
|
@ -4,7 +4,13 @@ A datalog engine.
|
|||
|
||||
from functools import reduce
|
||||
|
||||
from datalog.types import CachedDataset, Constant, Dataset, LVar, TableIndexedDataset
|
||||
from datalog.types import (
|
||||
CachedDataset,
|
||||
Constant,
|
||||
Dataset,
|
||||
LVar,
|
||||
TableIndexedDataset,
|
||||
)
|
||||
|
||||
|
||||
def match(tuple, expr, bindings=None):
|
||||
|
|
|
@ -4,8 +4,17 @@ A datalog reader.
|
|||
|
||||
from collections import defaultdict
|
||||
|
||||
from datalog.parser import FAILURE, Grammar, ParseError
|
||||
from datalog.types import Constant, Dataset, LVar, Rule
|
||||
from datalog.parser import (
|
||||
FAILURE,
|
||||
Grammar,
|
||||
ParseError,
|
||||
)
|
||||
from datalog.types import (
|
||||
Constant,
|
||||
Dataset,
|
||||
LVar,
|
||||
Rule,
|
||||
)
|
||||
|
||||
|
||||
class Actions(object):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue