Skip to content

Commit fab8863

Browse files
committed
chore: apply isort formatting
Signed-off-by: Adrien Barreau <adrien.barreau@ovhcloud.com>
1 parent b24d52e commit fab8863

File tree

8 files changed

+45
-45
lines changed

8 files changed

+45
-45
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
import sys
1615
import os
16+
import sys
1717

1818
# If extensions (or modules to document with autodoc) are in another directory,
1919
# add these directories to sys.path here. If the directory is relative to the

examples/serviceExpiration/serviceThatWillExpired.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# -*- encoding: utf-8 -*-
22

33
import datetime
4+
45
from tabulate import tabulate
6+
57
import ovh
68

79
# Services type desired to mine. To speed up the script, delete service type you don't use!

examples/serviceList/serviceList.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# -*- encoding: utf-8 -*-
22

33
import datetime
4+
45
from tabulate import tabulate
6+
57
import ovh
68

79
# Services type desired to mine. To speed up the script, delete service type you don't use!

ovh/__init__.py

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,20 @@
2727
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

2929
from .client import Client
30+
from .consumer_key import API_READ_ONLY, API_READ_WRITE, API_READ_WRITE_SAFE, ConsumerKeyRequest
3031
from .exceptions import (
3132
APIError,
32-
NetworkError,
33-
InvalidResponse,
34-
InvalidRegion,
35-
ReadOnlyError,
36-
ResourceNotFoundError,
3733
BadParametersError,
38-
ResourceConflictError,
34+
Forbidden,
3935
HTTPError,
40-
InvalidKey,
4136
InvalidCredential,
42-
NotGrantedCall,
37+
InvalidKey,
38+
InvalidRegion,
39+
InvalidResponse,
40+
NetworkError,
4341
NotCredential,
44-
Forbidden,
45-
)
46-
from .consumer_key import (
47-
ConsumerKeyRequest,
48-
API_READ_ONLY,
49-
API_READ_WRITE,
50-
API_READ_WRITE_SAFE,
42+
NotGrantedCall,
43+
ReadOnlyError,
44+
ResourceConflictError,
45+
ResourceNotFoundError,
5146
)

ovh/client.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,38 +35,38 @@
3535
"""
3636

3737
import hashlib
38-
import urllib
38+
import json
3939
import keyword
4040
import time
41-
import json
41+
import urllib
4242

4343
try:
4444
from urllib import urlencode
4545
except ImportError: # pragma: no cover
4646
# Python 3
4747
from urllib.parse import urlencode
4848

49-
from requests import request, Session
50-
from requests.packages import urllib3
49+
from requests import Session, request
5150
from requests.exceptions import RequestException
51+
from requests.packages import urllib3
5252

5353
from .config import config
5454
from .consumer_key import ConsumerKeyRequest
5555
from .exceptions import (
5656
APIError,
57-
NetworkError,
58-
InvalidResponse,
59-
InvalidRegion,
60-
InvalidKey,
61-
ResourceNotFoundError,
6257
BadParametersError,
63-
ResourceConflictError,
64-
HTTPError,
65-
NotGrantedCall,
66-
NotCredential,
6758
Forbidden,
59+
HTTPError,
6860
InvalidCredential,
61+
InvalidKey,
62+
InvalidRegion,
63+
InvalidResponse,
64+
NetworkError,
65+
NotCredential,
66+
NotGrantedCall,
67+
ResourceConflictError,
6968
ResourceExpiredError,
69+
ResourceNotFoundError,
7070
)
7171

7272
#: Mapping between OVH API region names and corresponding endpoints

ovh/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@
6565
import os
6666

6767
try:
68-
from ConfigParser import RawConfigParser, NoSectionError, NoOptionError
68+
from ConfigParser import NoOptionError, NoSectionError, RawConfigParser
6969
except ImportError: # pragma: no cover
7070
# Python 3
71-
from configparser import RawConfigParser, NoSectionError, NoOptionError
71+
from configparser import NoOptionError, NoSectionError, RawConfigParser
7272

7373
__all__ = ["config"]
7474

tests/test_client.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,30 @@
2626
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2727
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

29+
from collections import OrderedDict
30+
import json
2931
import unittest
3032
from unittest import mock
31-
import json
32-
from collections import OrderedDict
3333

3434
import requests
3535

36-
from ovh.client import Client, ENDPOINTS
36+
from ovh.client import ENDPOINTS, Client
3737
from ovh.exceptions import (
3838
APIError,
39-
NetworkError,
40-
InvalidResponse,
41-
InvalidRegion,
42-
ReadOnlyError,
43-
ResourceNotFoundError,
4439
BadParametersError,
45-
ResourceConflictError,
40+
Forbidden,
4641
HTTPError,
47-
InvalidKey,
4842
InvalidCredential,
49-
NotGrantedCall,
43+
InvalidKey,
44+
InvalidRegion,
45+
InvalidResponse,
46+
NetworkError,
5047
NotCredential,
51-
Forbidden,
48+
NotGrantedCall,
49+
ReadOnlyError,
50+
ResourceConflictError,
5251
ResourceExpiredError,
52+
ResourceNotFoundError,
5353
)
5454

5555
M_ENVIRON = {

tests/test_config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@
2626
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2727
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828

29-
from ovh import config
29+
import os
3030
import unittest
3131
from unittest import mock
32-
import os
32+
33+
from ovh import config
3334

3435
M_CONFIG_PATH = [
3536
"tests/fixtures/etc_ovh.conf",

0 commit comments

Comments
 (0)