Skip to content

Commit

Permalink
Less leakage (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii authored Oct 18, 2019
1 parent fc90312 commit 9eb2cf0
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 5 deletions.
2 changes: 2 additions & 0 deletions boost_histogram/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import absolute_import, division, print_function

del absolute_import, division, print_function

from ._hist import histogram

from . import axis, storage, accumulators, algorithm, numpy
Expand Down
2 changes: 2 additions & 0 deletions boost_histogram/_hist.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import absolute_import, division, print_function

del absolute_import, division, print_function

from .utils import FactoryMeta, KWArgs

from . import core as _core
Expand Down
2 changes: 2 additions & 0 deletions boost_histogram/accumulators.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import absolute_import, division, print_function

del absolute_import, division, print_function

from .core.accumulators import sum, mean, weighted_sum, weighted_mean
2 changes: 2 additions & 0 deletions boost_histogram/algorithm.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import absolute_import, division, print_function

del absolute_import, division, print_function

from .core.algorithm import shrink_and_rebin, slice_and_rebin, rebin, shrink, slice


Expand Down
13 changes: 8 additions & 5 deletions boost_histogram/axis.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from __future__ import absolute_import, division, print_function

del absolute_import, division, print_function

from .core.axis import regular_log, regular_sqrt, regular_pow, circular, options

from .core import axis as ca

from .utils import FactoryMeta, KWArgs
from .utils import FactoryMeta
from .utils import KWArgs as _KWArgs


# When Python 2 is dropped, this could use keyword
Expand All @@ -14,7 +17,7 @@ def _make_regular(bins, start, stop, **kwargs):
Make a regular axis with nice keyword arguments for underflow,
overflow, and growth.
"""
with KWArgs(kwargs) as k:
with _KWArgs(kwargs) as k:
metadata = k.optional("metadata")
options = k.options(underflow=True, overflow=True, growth=False, circular=False)

Expand Down Expand Up @@ -55,7 +58,7 @@ def _make_variable(edges, **kwargs):
Make a variable axis with nice keyword arguments for underflow,
overflow, and growth.
"""
with KWArgs(kwargs) as k:
with _KWArgs(kwargs) as k:
metadata = k.optional("metadata")
options = k.options(underflow=True, overflow=True, growth=False)

Expand Down Expand Up @@ -90,7 +93,7 @@ def _make_integer(start, stop, **kwargs):
Make an integer axis with nice keyword arguments for underflow,
overflow, and growth.
"""
with KWArgs(kwargs) as k:
with _KWArgs(kwargs) as k:
metadata = k.optional("metadata")
options = k.options(underflow=True, overflow=True, growth=False)

Expand Down Expand Up @@ -127,7 +130,7 @@ def _make_category(categories, **kwargs):
Make a category axis with ints or strings and with nice keyword
arguments for growth.
"""
with KWArgs(kwargs) as k:
with _KWArgs(kwargs) as k:
metadata = k.optional("metadata")
options = k.options(growth=False)

Expand Down
2 changes: 2 additions & 0 deletions boost_histogram/storage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import absolute_import, division, print_function

del absolute_import, division, print_function

from .core.storage import (
int,
double,
Expand Down
2 changes: 2 additions & 0 deletions boost_histogram/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import absolute_import, division, print_function

del absolute_import, division, print_function


class FactoryMeta(object):
def __init__(self, f, types):
Expand Down

0 comments on commit 9eb2cf0

Please sign in to comment.