Skip to content

Commit

Permalink
dropped Python 2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSchott authored Oct 29, 2019
1 parent 7723ade commit 24f643e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions keithley2600/result_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
import re
import numpy as np

PY2 = sys.version[0] == '2'

if not PY2:
basestring = str # in Python 3


def find_numbers(string):

Expand Down Expand Up @@ -172,7 +167,7 @@ def column_names(self):
@column_names.setter
def column_names(self, names_list):
"""Setter: List of strings with column names."""
if not all(isinstance(x, basestring) for x in names_list):
if not all(isinstance(x, str) for x in names_list):
raise ValueError("All column names must be of type 'str'.")
elif not len(names_list) == self.ncols:
raise ValueError('Number of column names does not match number of columns.')
Expand All @@ -188,7 +183,7 @@ def column_units(self):
@column_units.setter
def column_units(self, units_list):
"""Setter: List of strings with column units."""
if not all(isinstance(x, basestring) for x in units_list):
if not all(isinstance(x, str) for x in units_list):
raise ValueError("All column_units must be of type 'str'.")
elif not len(units_list) == self.ncols:
raise ValueError('Number of column_units does not match number of columns.')
Expand Down

0 comments on commit 24f643e

Please sign in to comment.