From d8a7026318995939c4b019b9d8e5fc73e85f045a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Nov 2026 10:25:27 +0000 Subject: [PATCH] style: use truth check instead of == False in api Replace `data['valid'] == False` with `not data['valid']` in data() and export(). `valid` is always a bool, so behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VCvw8haRnmyrVKrLkz5Yf8 --- succulent/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/succulent/api.py b/succulent/api.py index 58c3604..7e69f7e 100644 --- a/succulent/api.py +++ b/succulent/api.py @@ -163,7 +163,7 @@ def data(self): Response: JSON response with the stored data. """ data = self.processing.data(request) - if data['valid'] == False: + if not data['valid']: return jsonify({'message': data['message']}), data.get('code', 400) # Missing values (NaN) and infinities are not valid JSON, so send them @@ -177,7 +177,7 @@ def export(self): """Export the stored data to a CSV file. """ data = self.processing.export(request) - if data['valid'] == False: + if not data['valid']: return jsonify({'message': data['message']}), data.get('code', 400) # Convert DataFrame to CSV