@web.removeslash
    def post(self, token):
        if not token:
            return self.json({
                'error': 'No token!',
                'time': round(self.request.request_time(), 3),
            }, 400)

        filename = token % '%s.usertoken'
        tmp_file = self.get_tmp_file(filename=filename)

        if not tmp_file:
            return self.json({
                'error': 'Invalid token!',
                'time': round(self.request.request_time(), 3),
            }, 400)

        tmp_file_json = json.loads(tmp_file.get('file', ''))

        state = self.get_argument('state', default=None, strip=True)
        if not state:
            return self.json({
                'error': 'State parameter must be set!',
                'time': round(self.request.request_time(), 3),
            }, 400)

        if state != tmp_file_json.get('state', None):
            return self.json({
                'error': 'Invalid state!',
                'time': round(self.request.request_time(), 3),
            }, 400)


        self.json({
            'result': tmp_file_json,
            'time': round(self.request.request_time(), 3),
        })
dataset/ETHPy150Open argoroots/Entu/app/api/api2.py/API2UserAuthToken.post/swapped operands of `%`