Skip to content

Commit 7c8ce4f

Browse files
committed
Clean up __all__
1 parent ddc886f commit 7c8ce4f

File tree

5 files changed

+16
-53
lines changed

5 files changed

+16
-53
lines changed

boost_histogram/__init__.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@
55
# to delete / hide any extra items manually.
66
del absolute_import, division, print_function
77

8-
from ._internal.hist import Histogram
9-
from . import axis, storage, accumulators, algorithm, numpy
10-
from .tag import loc, rebin, sum, underflow, overflow
11-
from .version import __version__
12-
13-
Histogram.__module__ = "boost_histogram"
14-
15-
from .version import __version__
16-
178
__all__ = (
189
"Histogram",
1910
"axis",
@@ -29,6 +20,16 @@
2920
"__version__",
3021
)
3122

23+
24+
from ._internal.hist import Histogram
25+
from . import axis, storage, accumulators, algorithm, numpy
26+
from .tag import loc, rebin, sum, underflow, overflow
27+
from .version import __version__
28+
29+
Histogram.__module__ = "boost_histogram"
30+
31+
from .version import __version__
32+
3233
# Workarounds for smooth transitions from 0.5 series. Will be removed after 0.6.
3334

3435
from .tag import project

boost_histogram/axis/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
del absolute_import, division, print_function
44

5+
__all__ = ("Regular", "Variable", "Integer", "Category", "Axis", "options", "transform")
6+
57
from .._internal.axis import Axis, options
68
from .._internal.axis import Regular, Variable, Integer, Category
79
from . import transform
810

911
import warnings as _warnings
1012

11-
__all__ = ("Regular", "Variable", "Integer", "Category", "Axis", "options", "transform")
12-
1313
# Workarounds for smooth transitions from 0.5 series. Will be removed in later release.
1414

1515

boost_histogram/numpy.py

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

33
del absolute_import, division, print_function # hides these from IPython
44

5+
__all__ = ("histogram", "histogram2d", "histogramdd")
6+
57
from . import axis as _axis
68
from ._internal import hist as _hist
79
from . import _core
@@ -11,8 +13,6 @@
1113

1214
import numpy as _np
1315

14-
__all__ = ("histogram", "histogram2d", "histogramdd")
15-
1616

1717
def histogramdd(
1818
a, bins=10, range=None, normed=None, weights=None, density=None, **kwargs

boost_histogram/storage.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
cls.__module__ = "boost_histogram.storage"
3030

3131

32-
# Option 1:
33-
3432
# for lazy folks
3533
int = Int()
3634
double = Double()
@@ -39,39 +37,3 @@
3937
weight = Weight()
4038
mean = Mean()
4139
weighted_mean = WeightedMean()
42-
43-
# Option 2
44-
45-
# class DepStorageMixin(object):
46-
# def _get_storage_(self):
47-
# import warnings
48-
# warnings.warn("Use Int instead", DeprecationWarning)
49-
# return cls._STORAGE()
50-
#
51-
#
52-
# class int(DepStorageMixin, Int):
53-
# pass
54-
#
55-
#
56-
# class double(DepStorageMixin, Double):
57-
# pass
58-
#
59-
#
60-
# class unlimited(DepStorageMixin, Unlimited):
61-
# pass
62-
#
63-
#
64-
# class atomic_int(DepStorageMixin, AtomicInt):
65-
# pass
66-
#
67-
#
68-
# class weight(DepStorageMixin, Weight):
69-
# pass
70-
#
71-
#
72-
# class mean(DepStorageMixin, Mean):
73-
# pass
74-
#
75-
#
76-
# class weighted_mean(DepStorageMixin, WeightedMean):
77-
# pass

boost_histogram/tag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
del absolute_import, division, print_function
44

5-
import numpy as _np
6-
75
__all__ = ("Locator", "at", "loc", "overflow", "underflow", "rebin", "sum")
86

7+
import numpy as _np
8+
99

1010
class Locator(object):
1111
__slots__ = "offset"

0 commit comments

Comments
 (0)