Skip to content

Commit

Permalink
Cleaned up some codacy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
twheys committed Jan 7, 2019
1 parent a0f2556 commit 8c54364
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
6 changes: 0 additions & 6 deletions fireant/slicer/metrics.py
Expand Up @@ -61,9 +61,3 @@ def __repr__(self):
def share(self):
self._share = True
return self

@property
@immutable
def share(self):
self._share = True
return self
2 changes: 1 addition & 1 deletion fireant/slicer/queries/finders.py
Expand Up @@ -112,7 +112,7 @@ def find_share_dimensions(dimensions, operations):

dimension_map = {dimension.key: dimension
for dimension in dimensions}

return [dimension_map[dimension.key]
for dimension in share_operations_over_dimensions]

Expand Down
8 changes: 4 additions & 4 deletions fireant/slicer/totals.py
Expand Up @@ -70,12 +70,12 @@ def _scrub_totals_for_multilevel_index_df(data_frame, dimensions):
index=data_frame.index)

"""
If a row in the data frame is for totals for one index level, all of the subsequent index levels will also use a
If a row in the data frame is for totals for one index level, all of the subsequent index levels will also use a
totals marker. In order to avoid filtering the wrong rows, a new data frame is created similar to `is_totals_marker`
except a cell is only set to True if that value is a totals marker for the corresponding index level, the leaves of
except a cell is only set to True if that value is a totals marker for the corresponding index level, the leaves of
the dimension value tree.
This is acheived by rolling an XOR function across each index level with the previous level.
This is achieved by rolling an XOR function across each index level with the previous level.
"""
first_column = is_total_marker.columns[0]
is_totals_marker_leaf = pd.DataFrame(is_total_marker[first_column])
Expand Down

0 comments on commit 8c54364

Please sign in to comment.