Skip to content

Commit 08d0bb3

Browse files
authored
#42 Simplify Import Paths by Exposing Core Classes at Package Root (#43)
1 parent 0eb79a8 commit 08d0bb3

File tree

3 files changed

+33
-22
lines changed

3 files changed

+33
-22
lines changed

dev/lint-python.sh

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -643,26 +643,6 @@ function flake8_check() {
643643
print_function "STAGE" "flake8 checks... [SUCCESS]"
644644
fi
645645
}
646-
647-
648-
# mypy check
649-
function mypy_check() {
650-
print_function "STAGE" "mypy checks"
651-
652-
# the return value of a pipeline is the status of the last command to exit
653-
# with a non-zero status or zero if no command exited with a non-zero status
654-
set -o pipefail
655-
656-
(${MYPY_PATH} --install-types --non-interactive --config-file tox.ini) 2>&1 | tee -a ${LOG_FILE}
657-
TYPE_HINT_CHECK_STATUS=$?
658-
if [ ${TYPE_HINT_CHECK_STATUS} -ne 0 ]; then
659-
print_function "STAGE" "mypy checks... [FAILED]"
660-
# Stop the running script.
661-
exit 1;
662-
else
663-
print_function "STAGE" "mypy checks... [SUCCESS]"
664-
fi
665-
}
666646
###############################################################All Checks Definitions###############################################################
667647
668648
# CURRENT_DIR is "paimon-python/dev/"

pypaimon/__init__.py

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,35 @@
1717
#################################################################################
1818

1919
from .api import Schema
20+
from .py4j import Catalog
21+
from .py4j import CommitMessage
22+
from .py4j import Predicate
23+
from .py4j import PredicateBuilder
24+
from .py4j import ReadBuilder
25+
from .py4j import RowType
26+
from .py4j import Split
27+
from .py4j import Table
28+
from .py4j import BatchTableCommit
29+
from .py4j import TableRead
30+
from .py4j import TableScan
31+
from .py4j import Plan
32+
from .py4j import BatchTableWrite
33+
from .py4j import BatchWriteBuilder
2034

21-
__all__ = ['Schema']
35+
__all__ = [
36+
'Schema',
37+
'Catalog',
38+
'CommitMessage',
39+
'Predicate',
40+
'PredicateBuilder',
41+
'ReadBuilder',
42+
'RowType',
43+
'Split',
44+
'Table',
45+
'BatchTableCommit',
46+
'TableRead',
47+
'TableScan',
48+
'Plan',
49+
'BatchTableWrite',
50+
'BatchWriteBuilder'
51+
]

pypaimon/py4j/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from .util import constants
2020
from .java_implementation import \
21-
(Catalog, Table, ReadBuilder, TableScan, Plan, Split,
21+
(Catalog, Table, ReadBuilder, TableScan, Plan, RowType, Split,
2222
TableRead, BatchWriteBuilder, BatchTableWrite, CommitMessage,
2323
BatchTableCommit, Predicate, PredicateBuilder)
2424

@@ -29,6 +29,7 @@
2929
'ReadBuilder',
3030
'TableScan',
3131
'Plan',
32+
'RowType',
3233
'Split',
3334
'TableRead',
3435
'BatchWriteBuilder',

0 commit comments

Comments
 (0)