Skip to content

Commit 2ed67ae

Browse files
authored
Reformat black and isort (RedHatQE#1138)
1 parent 0bb9472 commit 2ed67ae

17 files changed

+17
-22
lines changed

.isort.cfg

-7
This file was deleted.

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ default_language_version:
33

44
repos:
55
- repo: https://github.com/myint/autoflake
6-
rev: "v2.0.1"
6+
rev: "v2.0.2"
77
hooks:
88
- id: autoflake
99
args:

docs/conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import os
2020
import sys
2121

22-
2322
sys.path.insert(0, os.path.abspath("../"))
2423

2524
project = "openshift-python-wrapper"

examples/general.py

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
from ocp_resources.namespace import Namespace
55

6-
76
client = DynamicClient(client=kubernetes.config.new_client_from_config())
87

98
# The examples given below are relevant to all resources. For simplicity we will use the resource - Namespace.

examples/node_network_configuration_policy.py

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
NodeNetworkConfigurationPolicy,
33
)
44

5-
65
# Using capture syntax to switch ipv4 config between interfaces
76
my_nncp = NodeNetworkConfigurationPolicy(
87
name="capture_nncp",

examples/pods.py

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
from ocp_resources.pod import Pod
55

6-
76
client = DynamicClient(client=kubernetes.config.new_client_from_config())
87

98
# Query to get Pods (resource) in the connected cluster with label of ``label_example=example``.

examples/role.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from ocp_resources.role import Role
22

3-
43
# The example bellow is also relevant for the ClusterRole resource.
54
# Add multiple rules to a specific Role or ClusterRole as a list of rules dictionaries:
65
rules = [

examples/virtual_machine.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from ocp_resources.virtual_machine import VirtualMachine
22

3-
43
# Create a VM
54
with VirtualMachine(
65
name="vm-example",

ocp_resources/constants.py

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
)
77
from urllib3.exceptions import MaxRetryError, ProtocolError
88

9-
109
DEFAULT_CLUSTER_RETRY_EXCEPTIONS = {
1110
MaxRetryError: [],
1211
ConnectionAbortedError: [],

ocp_resources/event.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from ocp_resources.logger import get_logger
22

3-
43
LOGGER = get_logger(name=__name__)
54

65

ocp_resources/logger.py

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
from colorlog import ColoredFormatter
77

8-
98
LOGGER = logging.getLogger(__name__)
109
LOGGERS = {}
1110

ocp_resources/machine_set.py

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from ocp_resources.resource import NamespacedResource
33
from ocp_resources.utils import TimeoutExpiredError, TimeoutSampler
44

5-
65
TIMEOUT_5MINUTES = 300
76

87

ocp_resources/network_attachment_definition.py

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from ocp_resources.resource import NamespacedResource
44

5-
65
DEFAULT_CNI_VERSION = "0.3.1"
76

87

ocp_resources/node_network_state.py

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from ocp_resources.resource import Resource
77
from ocp_resources.utils import TimeoutSampler
88

9-
109
SLEEP = 1
1110

1211

ocp_resources/resource.py

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
skip_existing_resource_creation_teardown,
3030
)
3131

32-
3332
LOGGER = get_logger(__name__)
3433
MAX_SUPPORTED_API_VERSION = "v2"
3534

ocp_resources/utils.py

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from ocp_resources.logger import get_logger
66

7-
87
LOGGER = get_logger(name=__name__)
98

109

pyproject.toml

+16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
[tool.black]
22
line-length = 88
3+
target_version = ['py37', 'py38', 'py39', 'py310', "py311"]
4+
exclude = '''
5+
(
6+
/(
7+
| \.git
8+
| \.venv
9+
| \.mypy_cache
10+
| \.tox
11+
)/
12+
)
13+
'''
14+
15+
[tool.isort]
16+
line_length = 88
17+
profile = "black"
18+
319

420
[build-system]
521
requires = ["setuptools>=61.2"]

0 commit comments

Comments
 (0)