Skip to content

Commit 454e807

Browse files
committed
[API Clean]Clean __all__ to avoid exposing usless API
1 parent c838c1e commit 454e807

27 files changed

+63
-58
lines changed

python/paddle/jit/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
from .api import save
1717
from .api import load
18-
from .api import TracedLayer
1918
from .api import set_code_level
2019
from .api import set_verbosity
2120
from .api import declarative as to_static
@@ -34,5 +33,4 @@
3433
'set_code_level',
3534
'set_verbosity',
3635
'not_to_static',
37-
'TracedLayer',
3836
]

python/paddle/jit/api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@
7474
from paddle.fluid.wrapped_decorator import wrap_decorator
7575

7676
__all__ = [
77-
'TracedLayer',
7877
'declarative',
79-
'dygraph_to_static_func',
8078
'set_code_level',
8179
'set_verbosity',
8280
'save',

python/paddle/jit/dy2static/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@
3636
from .assert_transformer import AssertTransformer
3737
from .ast_transformer import DygraphToStaticAst
3838
from .program_translator import convert_to_static
39-
from .static_analysis import * # noqa: F403
39+
from .static_analysis import AstNodeWrapper, NodeVarType, StaticAnalysisVisito
4040

4141
__all__ = []

python/paddle/jit/dy2static/assert_transformer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
BaseTransformer,
2323
)
2424

25-
__all__ = ['AssertTransformer']
25+
__all__ = []
2626

2727

2828
class AssertTransformer(BaseTransformer):

python/paddle/jit/dy2static/ast_transformer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
from . import logging_utils
7272
from .utils import ast_to_source_code
7373

74-
__all__ = ['DygraphToStaticAst']
74+
__all__ = []
7575

7676

7777
def apply_optimization(transformers):

python/paddle/jit/dy2static/base_transformer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
get_attribute_full_name,
2828
)
2929

30+
__all__ = []
31+
3032

3133
class BaseTransformer(gast.NodeTransformer):
3234
def visit(self, node):

python/paddle/jit/dy2static/basic_api_transformer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
BaseTransformer,
2424
)
2525

26+
__all__ = []
27+
2628

2729
class BasicApiTransformer(BaseTransformer):
2830
"""

python/paddle/jit/dy2static/break_continue_transformer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
ForNodeVisitor,
2828
)
2929

30-
__all__ = ['BreakContinueTransformer']
30+
__all__ = []
3131

3232
BREAK_NAME_PREFIX = '__break'
3333
CONTINUE_NAME_PREFIX = '__continue'

python/paddle/jit/dy2static/call_transformer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
PDB_SET = "pdb.set_trace"
2727

28+
__all__ = []
29+
2830

2931
class CallTransformer(BaseTransformer):
3032
"""

python/paddle/jit/dy2static/cast_transformer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
BaseTransformer,
2323
)
2424

25+
__all__ = []
26+
2527

2628
class CastTransformer(BaseTransformer):
2729
"""

0 commit comments

Comments
 (0)