I am reading page 255 of Qing Liu and he claims that if $U,V$ are affine open subsets of a scheme $X$, then $\mathcal{O}_X(U) \to \mathcal{O}_X(V)$ is a flat morphism. Why is this necessarily the case? There are no finiteness assumptions or anything right now on $X$.
If $V = \operatorname{Spec} A_f$ and $U = \operatorname{Spec} A$ then the restriction map is just the canonical map $A \to A_f$ which is flat by exactness of localization. What about the general case of $V$ not necessarily being a basic open set?