def tryint(s: str) -> str | int:
        """If `s` is a number, return an int, else `s` unchanged."""
        try:
            return int(s)
        except ValueError:
            return s
If `s` is a number, return an int, else `s` unchanged.
coverage/misc.py