10. Given the function
$$
f(x)=\left\{\begin{array}{ll}
x, & x \text { is irrational; } \\
\frac{q+1}{p}, & x=\frac{q}{p}\left(p, q \in \mathbf{Z}_{+},(p, q)=1, p>q\right) .
\end{array}\right.
$$

Then the maximum value of the function $f(x)$ in the interval $\left(\frac{7}{8}, \frac{8}{9}\right)$ is . $\qquad$
10. $\frac{16}{17}$.
(1) If $x$ is a rational number, and $x \in\left(\frac{7}{8}, \frac{8}{9}\right)$, let
$$
x=\frac{a}{a+\lambda} \in\left(\frac{7}{8}, \frac{8}{9}\right)\left(a 、 \lambda \in \mathbf{Z}_{+}\right) \text {. }
$$

From $\frac{7}{8}<\frac{a}{a+\lambda}<\frac{8}{9}$, we get
$$
\begin{array}{l}
7(a+\lambda)<8a, \quad 8a<9(a+\lambda), \\
\lambda<\frac{a}{7}, \quad \lambda>\frac{a}{9}, \\
\frac{a}{9}<\lambda<\frac{a}{7} .
\end{array}
$$

Since $\lambda \in \mathbf{Z}_{+}$, we have $\lambda=1$ and $a=8$. Therefore, $x=\frac{8}{9}$ is not in the interval $\left(\frac{7}{8}, \frac{8}{9}\right)$. When $a=15$ and $\lambda=2$, we have $x=\frac{15}{17} \in\left(\frac{7}{8}, \frac{8}{9}\right)$, and
$$
f(x)=\frac{16}{17} \cdot 17=16 .
$$

When $x=\frac{15}{17}$, $f(x)$ reaches its maximum value of 16.
(2) If $x$ is an irrational number, and $x \in\left(\frac{7}{8}, \frac{8}{9}\right)$, then
$$
f(x)=x<\frac{8}{9}<\frac{16}{17} \text {. }
$$

In summary, the maximum value of $f(x)$ in the interval $\left(\frac{7}{8}, \frac{8}{9}\right)$ is $\frac{16}{17}$.