They are both required if the function is not a LookupTable.  Perhaps the order of the if statements could be rearranged to something like:
```
if not isinstance(tp, galsim.LookupTable):
    if blue_limit is None or red_limit is None:
        raise AttributeError("red_limit and blue_limit are required if throughput is not a LookupTable")
```