@staticmethod
    def validate_object(data, object_description, new_record=True):
        """
        Validates a dictionary of object data against an object's full
        description dictionary. Returns a 2-tuple (is_valid, errors) where
        errors is a dictionary keyed by field name.
        """
        errors = {}
        field_map = {f['name']: f for f in object_description['fields']}
        for field_name, field in field_map.items():
            field_errors = SalesforceRestClientBase.validate_field(
                data.get(field_name), field, new_record=new_record)
            if field_errors:
                errors[field_name] = field_errors

        for field_name in set(field_map.keys()) - set(data.keys()):
            errors[field_name] = ['Field name not found']
        return not errors, errors
dataset/ETHPy150Open heroku/python-salesforce-client/salesforce/rest/base.py/SalesforceRestClientBase.validate_object/swapped operands of `-`