Bug report
Bug description:
Calling shlex.push_source() after the current input has reached EOF leaves the lexer in state == None, so the newly pushed source is never read. Subsequent get_token() calls immediately return EOF instead of consuming the new input.
from shlex import shlex
lexer = shlex('a')
print(lexer.get_token())
print(lexer.get_token())  # EOF -> state is None
lexer.push_source('b', None)
print(lexer.get_token())  # actural '' (EOF), expected: 'b' 
CPython versions tested on:
3.12
Operating systems tested on:
Linux