This is exercise 4 from chapter 1 of the book "diffeology" by Patrick Iglesias-Zemmour.
Let $\alpha \in \mathbb{R}$ and $\beta \in \mathbb{R}$ be irrational numbers. Define the irrational (non-commutative) torus $T_{\alpha} = \mathbb{R}/(\mathbb{Z}+ \alpha \mathbb{Z})$, and define $T_{\beta}$ analogously. Let $\pi_{\alpha}: \mathbb{R} \rightarrow T_{\alpha}$ be the canonical projection, and likewise for $\pi_{\beta}$.
A diffeology on $T_{\alpha}$ is collection of maps $P: U \rightarrow T_{\alpha}$, where $U$ is an open subset of $\mathbb{R}^{n}$ for some $n$. The members of the diffeology are called plots. The diffeology we would like to consider is the following.
A map $P: U \rightarrow T_{\alpha}$ is a plot if for any $r \in U$, there exists an open neighborhood $V_{r}$ of $r$, and a smooth map $Q: V_{r} \rightarrow T_{\alpha}$ such that $\pi_{\alpha} \circ Q = P|_{V_{r}}$. In other words, the plots are the maps that locally factor through a smooth map $Q: V \rightarrow \mathbb{R}$.
We can endow $\mathbb{R}$ with a diffeology: the plots are the smooth maps. A map between diffeological spaces is smooth if it sends plots to plots.
Claim: if $f: T_{\alpha} \rightarrow \mathbb{R}$ is smooth, then $f$ is constant.
Let me sketch a proof. If $f$ is to be smooth, then $f \circ \pi_{\alpha}: \mathbb{R} \rightarrow \mathbb{R}$ must be smooth. (This follows from the fact that $\pi_{\alpha}$ is a plot, and hence $f \circ \pi_{\alpha}$ must be a plot). If $f$ is non-constant, then $f \circ \pi_{\alpha}$ is non-continuous. This can be seen directly as follows. Let $t,t' \in T_{\alpha}$ such that $f(t) \neq f(t')$. Then we choose $\epsilon = |f(t) - f(t')|/2 > 0$. Now if $\delta > 0$, then there exist $x, x' \in \mathbb{R}$, with $|x - x'| < \delta$ and $\pi_{\alpha}(x) = t$ and $\pi_{\alpha}(x') = t'$, (this is because $\mathbb{Z} + \alpha \mathbb{Z}$ is dense in $\mathbb{R}$). Finally, we see $|f \circ \pi_{\alpha}(x) - f \circ \pi_{\alpha}(x')| = |f(t) - f(t')| > \epsilon$.
Now comes the part that troubles me.
Problem: Let $f: T_{\alpha} \rightarrow T_{\beta}$ be smooth. Then there exists some interval $J \subset \mathbb{R}$ and an affine map $F:J \rightarrow \mathbb{R}$, such that $\pi_{\beta} \circ F = f \circ \pi_{\alpha}|_{J}$. Furthermore $F$ can be extended affinely to $\mathbb{R}$.
I have some progress. Like before, if $f$ is smooth, then $f \circ \pi_{\alpha}: \mathbb{R} \rightarrow T_{\beta}$ is a plot. This means there exists an open interval $I$ and a smooth map $Q:I \rightarrow \mathbb{R}$, such that \begin{equation} f \circ \pi_{a}|_{I} = \pi_{\beta} \circ Q. \end{equation} My suspicion is that the map $Q$ is the map $F$ that we are after. However, I don't know how to show that $Q$ is an affine map. The exercise hints that I should use the fact that $\mathbb{Z} + \alpha \mathbb{Z}$ is dense in $\mathbb{R}$, but I don't really see how to apply this. I had the thought of showing that the derivative of $Q:I \rightarrow \mathbb{R}$ is constant, but I didn't really make any progress.
Since $f$ is smooth we see that $f\circ\pi_\alpha:\mathbb{R}\to T_\beta$ is a plot. Hence, there exists some open neighborhood $I$ (without loss of generality we can suppose that it is an open interval) and some smooth map $Q:I\to\mathbb{R}$ such that $$\pi_\beta\circ Q = f\circ\pi_\alpha|_{I}.$$ Note that for all $x\in I\subseteq \mathbb{R}$, $n,m\in\mathbb{Z}$ satisfying $x+n+\alpha m\in I$ we have $$\pi_\beta\circ Q(x+n+\alpha m)=f\circ\pi_\alpha(x+n+\alpha m) = f\circ\pi_\alpha(x) = \pi_\beta\circ Q(x).$$ Since $\pi_\beta:\mathbb{R}\to T_\beta$ is the natural projection map we see that there exists integers $l,k\in\mathbb{Z}$ satisfying $$Q(x + n + \alpha m)=Q(x) + l + \beta k.$$ Note that since $\beta$ is irrational that $l=l(x,n,m)$ and $k=k(x,n,m)$ are unique.
Fix some point $y\in I$. Since $I$ is an interval we can find some interval $J\subseteq I$ centered at $y$ and another interval $U\subseteq\mathbb{R}$ centered at $0$ such that $x\in J$ and $n+\alpha m\in U$ implies that $x+n+\alpha m\in I.$ Furthermore, by shrinking $J$ we can ensure that $J\subseteq y + U.$ Since $Q$ is continuous and $\mathbb{Z}+\alpha\mathbb{Z}$ is totally disconnected, we see that $$l + \beta k=Q(x+n+\alpha m) - Q(x)$$ must be constant as a function of $x$ in $J$ - this follows since the image of a connected set under a continuous map remains connected. Now we use the fact that $Q$ is smooth and that the derivative of a constant function is zero to deduce $$Q'(x)=Q'(x+n+\alpha m)$$ for all $x\in J$. In particular, we have that $Q'(y)=Q'(y+n+\alpha m)$ for all $(n,m)\in\mathbb{Z}\times\mathbb{Z}$ such that $n+\alpha m\in U.$
Now we use the hint that $\mathbb{Z}+\alpha\mathbb{Z}$ is dense in $\mathbb{R}$. In particular, we have that $\mathbb{Z}+\alpha\mathbb{Z}$ is dense in $U$. Now fix $x\in J$ and since $J\subseteq y + U$ we can use the density to find a sequence $\{(n_i,m_i)\}_{i\in\mathbb{N}}\subseteq\mathbb{Z}\times\mathbb{Z}$ such that $n_i+\alpha m_i\in U$ and $$y+n_i+\alpha m_i\to x\quad\text{as }i\to+\infty.$$ Since $Q'$ is continuous we see that $$Q'(x)=\lim_{i\to+\infty}Q'(y+n_i + \alpha m_i) = Q'(y).$$ Hence $Q'$ is constant in $J$, and $Q|_J$ is affine, i.e. there exists $a,b\in\mathbb{R}$ such that $$Q(x)=ax + b\quad\text{for all }x\in J.$$
Now by taking $F=Q$ in the question statement we are done.