diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b134204..c6e1532e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.11 cache: 'pip' cache-dependency-path: '**/requirements*.txt' - name: Install dependencies diff --git a/aiohttp_devtools/logs.py b/aiohttp_devtools/logs.py index 53683d26..3087d528 100644 --- a/aiohttp_devtools/logs.py +++ b/aiohttp_devtools/logs.py @@ -80,7 +80,7 @@ def formatMessage(self, record: logging.LogRecord) -> str: def formatException(self, ei: _Ei) -> str: sio = StringIO() - traceback.print_exception(*ei, file=sio) # type: ignore[misc] + traceback.print_exception(*ei, file=sio) stack = sio.getvalue() sio.close() if self.stream_is_tty and pyg_lexer: diff --git a/aiohttp_devtools/runserver/config.py b/aiohttp_devtools/runserver/config.py index eed7c392..cbde5014 100644 --- a/aiohttp_devtools/runserver/config.py +++ b/aiohttp_devtools/runserver/config.py @@ -103,8 +103,8 @@ def static_path_str(self) -> Optional[str]: return str(self.static_path) if self.static_path else None @property - def client_ssl_context(self) -> Union[SSLContext, None]: - client_ssl_context = None + def client_ssl_context(self) -> Union[SSLContext, bool]: + client_ssl_context: Union[SSLContext, bool] = True if self.protocol == "https": client_ssl_context = create_default_ssl_context() if self.ssl_rootcert_file_path: diff --git a/aiohttp_devtools/runserver/watch.py b/aiohttp_devtools/runserver/watch.py index 938eda85..ca009160 100644 --- a/aiohttp_devtools/runserver/watch.py +++ b/aiohttp_devtools/runserver/watch.py @@ -62,7 +62,7 @@ def __init__(self, config: Config): self._reloads = 0 self._session: Optional[ClientSession] = None self._runner = None - self._client_ssl_context: Union[None, SSLContext] = None + self._client_ssl_context: Union[bool, SSLContext] = True assert self._config.watch_path super().__init__(self._config.watch_path)