mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 08:47:39 +08:00
future first: switch the order of some if statements (#5206)
Since we're adding this to our contribution guidelines in https://github.com/python/typeshed/pull/5205
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import sys
|
||||
from typing import Any, MutableMapping
|
||||
|
||||
if sys.version_info < (3, 0):
|
||||
from cookielib import CookieJar
|
||||
else:
|
||||
if sys.version_info >= (3, 0):
|
||||
from http.cookiejar import CookieJar
|
||||
else:
|
||||
from cookielib import CookieJar
|
||||
|
||||
class MockRequest:
|
||||
type: Any
|
||||
|
||||
@@ -6,13 +6,12 @@ from . import exceptions, util
|
||||
from .packages import ssl_match_hostname
|
||||
from .util import ssl_
|
||||
|
||||
if sys.version_info < (3, 0):
|
||||
from httplib import HTTPConnection as _HTTPConnection, HTTPException as HTTPException
|
||||
class ConnectionError(Exception): ...
|
||||
|
||||
else:
|
||||
if sys.version_info >= (3, 0):
|
||||
from builtins import ConnectionError as ConnectionError
|
||||
from http.client import HTTPConnection as _HTTPConnection, HTTPException as HTTPException
|
||||
else:
|
||||
from httplib import HTTPConnection as _HTTPConnection, HTTPException as HTTPException
|
||||
class ConnectionError(Exception): ...
|
||||
|
||||
class DummyConnection: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user