Lemma 32.37.2. Let $X$ be an affine scheme all of whose local rings are Noetherian of dimension $\leq 1$. Then any quasi-compact open $U \subset X$ is affine.

Proof. Denote $j : U \to X$ the inclusion morphism. Let $\mathcal{F}$ be a quasi-coherent $\mathcal{O}_ U$-module. By Lemma 32.37.1 the higher direct images $R^ pj_*\mathcal{F}$ are zero. The $\mathcal{O}_ X$-module $j_*\mathcal{F}$ is quasi-coherent (Schemes, Lemma 25.24.1). Hence it has vanishing higher cohomology groups by Cohomology of Schemes, Lemma 29.2.2. By the Leray spectral sequence Cohomology, Lemma 20.14.6 we have $H^ p(U, \mathcal{F}) = 0$ for all $p > 0$. Thus $U$ is affine, for example by Cohomology of Schemes, Lemma 29.3.1. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).