Skip to content

Commit 30b9215

Browse files
authored
Use __all__ for public API exports (#1551)
* Added top-level alls * Added alls to nested public modules
1 parent 59a68ae commit 30b9215

File tree

37 files changed

+388
-1
lines changed

37 files changed

+388
-1
lines changed

frictionless/__init__.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,49 @@
2020
from .table import Header, Lookup, Row
2121
from .transformer import Transformer
2222
from .validator import Validator
23+
24+
__all__ = [
25+
"Adapter"
26+
"Analyzer"
27+
"Catalog"
28+
"Check"
29+
"Checklist"
30+
"Control"
31+
"Dataset"
32+
"Detector"
33+
"Dialect"
34+
"Error"
35+
"Field"
36+
"FrictionlessException"
37+
"Header"
38+
"Indexer"
39+
"Inquiry"
40+
"InquiryTask"
41+
"Loader"
42+
"Lookup"
43+
"Mapper"
44+
"Metadata"
45+
"Package"
46+
"Parser"
47+
"Pipeline"
48+
"Platform"
49+
"Plugin"
50+
"Report"
51+
"ReportTask"
52+
"Resource"
53+
"Row"
54+
"Schema"
55+
"Step"
56+
"System"
57+
"Transformer"
58+
"Validator"
59+
"convert"
60+
"describe"
61+
"extract"
62+
"index"
63+
"list"
64+
"platform"
65+
"system"
66+
"transform"
67+
"validate"
68+
]

frictionless/checks/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,17 @@
22
from .cell import *
33
from .row import *
44
from .table import *
5+
6+
__all__ = [
7+
"ascii_value"
8+
"baseline"
9+
"deviated_cell"
10+
"deviated_value"
11+
"duplicate_row"
12+
"forbidden_value"
13+
"required_value"
14+
"row_constraint"
15+
"sequential_value"
16+
"table_dimensions"
17+
"truncated_value"
18+
]

frictionless/errors/__init__.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,66 @@
77
from .resource import *
88
from .row import *
99
from .table import *
10+
11+
__all__ = [
12+
"AsciiValueError"
13+
"BlankHeaderError"
14+
"BlankLabelError"
15+
"BlankRowError"
16+
"ByteCountError"
17+
"CatalogError"
18+
"CellError"
19+
"CheckError"
20+
"ChecklistError"
21+
"CompressionError"
22+
"ConstraintError"
23+
"ControlError"
24+
"DataError"
25+
"DatasetError"
26+
"DetectorError"
27+
"DeviatedCellError"
28+
"DeviatedValueError"
29+
"DialectError"
30+
"DuplicateLabelError"
31+
"DuplicateRowError"
32+
"EncodingError"
33+
"ExtraCellError"
34+
"ExtraLabelError"
35+
"FieldCountError"
36+
"FieldError"
37+
"FileError"
38+
"ForbiddenValueError"
39+
"ForeignKeyError"
40+
"FormatError"
41+
"FrictionlessException"
42+
"HashCountError"
43+
"HeaderError"
44+
"IncorrectLabelError"
45+
"InquiryError"
46+
"InquiryTaskError"
47+
"LabelError"
48+
"MetadataError"
49+
"MissingCellError"
50+
"MissingLabelError"
51+
"PackageError"
52+
"PipelineError"
53+
"PrimaryKeyError"
54+
"ReportError"
55+
"ReportTaskError"
56+
"RequiredValueError"
57+
"ResourceError"
58+
"RowConstraintError"
59+
"RowCountError"
60+
"RowError"
61+
"SchemaError"
62+
"SchemeError"
63+
"SequentialValueError"
64+
"SourceError"
65+
"StatsError"
66+
"StepError"
67+
"TableDimensionsError"
68+
"TableError"
69+
"TruncatedValueError"
70+
"TypeError"
71+
"UniqueError"
72+
]

frictionless/fields/__init__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,21 @@
1313
from .time import TimeField
1414
from .year import YearField
1515
from .yearmonth import YearmonthField
16+
17+
__all__ = [
18+
"AnyField"
19+
"ArrayField"
20+
"BooleanField"
21+
"DateField"
22+
"DatetimeField"
23+
"DurationField"
24+
"GeojsonField"
25+
"GeopointField"
26+
"IntegerField"
27+
"NumberField"
28+
"ObjectField"
29+
"StringField"
30+
"TimeField"
31+
"YearField"
32+
"YearmonthField"
33+
]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
from .control import CsvControl
22
from .parser import CsvParser
33
from .plugin import CsvPlugin
4+
5+
__all__ = [
6+
"CsvControl",
7+
"CsvParser",
8+
"CsvPlugin",
9+
]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
from .plugin import DocumentPlugin
2+
3+
__all__ = [
4+
"DocumentPlugin",
5+
]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
from .mapper import ErdMapper
2+
3+
__all__ = [
4+
"ErdMapper",
5+
]

frictionless/formats/excel/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@
33
from .mapper import ExcelMapper
44
from .parsers import XlsParser, XlsxParser
55
from .plugin import ExcelPlugin
6+
7+
__all__ = [
8+
"ExcelAdapter",
9+
"ExcelControl",
10+
"ExcelMapper",
11+
"ExcelPlugin",
12+
"XlsParser",
13+
"XlsxParser",
14+
]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
from .control import GsheetsControl
22
from .parser import GsheetsParser
33
from .plugin import GsheetsPlugin
4+
5+
__all__ = [
6+
"GsheetsControl",
7+
"GsheetsParser",
8+
"GsheetsPlugin",
9+
]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
from .control import HtmlControl
22
from .parser import HtmlParser
33
from .plugin import HtmlPlugin
4+
5+
__all__ = [
6+
"HtmlControl",
7+
"HtmlParser",
8+
"HtmlPlugin",
9+
]

0 commit comments

Comments
 (0)