<commit_before>#!/usr/bin/env python3

# import pint

try:
    from labtoolkit.GenericInstrument import GenericInstrument
    from labtoolkit.IEEE488 import IEEE488
    from labtoolkit.SCPI import SCPI

except ImportError:
    from GenericInstrument import GenericInstrument
    from IEEE488 import IEEE488
    from SCPI import SCPI


# ureg = pint.UnitRegistry()
# ureg.default_format = '~P'
# Q_ = ureg.Quantity


class Positioner(GenericInstrument):

    def __init__(self, instrument):
        super().__init__(instrument)

    def __repr__(self):
        return("{}, {}".format(__class__, self.instrument))


class AnaheimAutomationSMC40(Positioner):

    # http://www.anaheimautomation.com/manuals/stepper/L010098%20-%20SMC40%20Users%20Guide.pdf

    def __init__(self, instrument):
        super().__init__(instrument)

    def __repr__(self):
        return("{}, {}".format(__class__, self.instrument))

    @property
    def heading(self):
        return NotImplemented

    @heading.setter
    def heading(self, clockwise=True):
        if clockwise is True:
            self.write('D+')  # Clockwise
        else:
            self.write('D-')  # Anti-Clockwise

    @property
    def stepangle(self):
        return NotImplemented

    @stepangle.setter
    def stepangle(self, stepangle=1):  # 100 is 1 degree
        # self.write('XMN{}'.format(int(stepsize*100)))
        # int(Q_(stepangle, 'degree').magnitude * 100)
        # self.write('XMN{}'.format(int(Q_(stepangle, 'degree').magnitude * 100)))

    def zero(self):
        self.write('XGH')

    def init(self):
        self.write('@0')

    def IDN(self):
        return self.query('ID')

    def WAI(self):
        return self.query('XMC')  # ??

    def TRG(self):
        self.write('XGR')

    def move(self, clockwise=True, angle=1, wait=True):<commit_msg>Remove Pint from drivers<commit_after>#!/usr/bin/env python3

# import pint

try:
    from labtoolkit.GenericInstrument import GenericInstrument
    from labtoolkit.IEEE488 import IEEE488
    from labtoolkit.SCPI import SCPI

except ImportError:
    from GenericInstrument import GenericInstrument
    from IEEE488 import IEEE488
    from SCPI import SCPI


# ureg = pint.UnitRegistry()
# ureg.default_format = '~P'
# Q_ = ureg.Quantity


class Positioner(GenericInstrument):

    def __init__(self, instrument):
        super().__init__(instrument)

    def __repr__(self):
        return("{}, {}".format(__class__, self.instrument))


class AnaheimAutomationSMC40(Positioner):

    # http://www.anaheimautomation.com/manuals/stepper/L010098%20-%20SMC40%20Users%20Guide.pdf

    def __init__(self, instrument):
        super().__init__(instrument)

    def __repr__(self):
        return("{}, {}".format(__class__, self.instrument))

    @property
    def heading(self):
        return NotImplemented

    @heading.setter
    def heading(self, clockwise=True):
        if clockwise is True:
            self.write('D+')  # Clockwise
        else:
            self.write('D-')  # Anti-Clockwise

    @property
    def stepangle(self):
        return NotImplemented

    @stepangle.setter
    def stepangle(self, stepangle=1):  # 100 is 1 degree
        self.write('XMN{}'.format(int(stepsize*100)))
        # int(Q_(stepangle, 'degree').magnitude * 100)
        # self.write('XMN{}'.format(int(Q_(stepangle, 'degree').magnitude * 100)))

    def zero(self):
        self.write('XGH')

    def init(self):
        self.write('@0')

    def IDN(self):
        return self.query('ID')

    def WAI(self):
        return self.query('XMC')  # ??

    def TRG(self):
        self.write('XGR')

    def move(self, clockwise=True, angle=1, wait=True):
{'fraction_non_alphanumeric': 0.12918139787870547, 'fraction_numerical': 0.025564318738101714, 'mean_word_length': 3.002176278563656, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3592040', 'n_tokens_mistral': 1276, 'n_tokens_neox': 1159, 'n_words': 242}