Skip to content

Commit

Permalink
dead code removal
Browse files Browse the repository at this point in the history
  • Loading branch information
nickzoic committed Nov 9, 2023
1 parent b07b8a5 commit bdd5d25
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
7 changes: 0 additions & 7 deletions countess/gui/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@
def _limit(value, min_value, max_value):
return max(min_value, min(max_value, value))


def _snap(value, scale, steps=21):
step_size = scale / steps
value = _limit(value, 0, scale)
return ((round(value / step_size)) + 0.5) * step_size


def _geometry(widget):
return (
widget.winfo_x(),
Expand Down
23 changes: 0 additions & 23 deletions countess/plugins/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,6 @@
from countess.core.plugins import PandasInputFilesPlugin, PandasProcessPlugin
from countess.utils.pandas import flatten_columns

# XXX it would be better to do the same this Regex Tool does and get the user to assign
# data types to each column


def maybe_number(x):
"""CSV is never clear on if something is actually a number so ... try it I guess ..."""
try:
return int(x)
except ValueError:
pass

try:
return float(x)
except ValueError:
pass

return x


def clean_row(row):
return [maybe_number(x) for x in row]


class LoadCsvPlugin(PandasInputFilesPlugin):
"""Load CSV files"""

Expand Down

0 comments on commit bdd5d25

Please sign in to comment.