This change helped pass a test case that previously was not understood: "
-    # Hypothesis: once setupterm() has run and decided the tty supports 256
-    # colors, it never changes its mind. "

-- this call would have now raised an exception, as setupterm() is never called for terminals where does_styling is None -- but didn't, because you already initialized an xterm256-color terminal.

The python _curses "setupterm() must first be called" exception would otherwise be raised. This change avoids raising such an exception, returning 0 for terminals where does_styling is None.