mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-08 21:15:17 +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 parent
b308c1f964
commit
fa9d5a5e9f
36 files changed
+147
-146
No files matched your search
@@ -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