Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .isort.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:

repos:
- repo: https://github.com/myint/autoflake
rev: "v2.0.1"
rev: "v2.0.2"
hooks:
- id: autoflake
args:
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import os
import sys


sys.path.insert(0, os.path.abspath("../"))

project = "openshift-python-wrapper"
Expand Down
1 change: 0 additions & 1 deletion examples/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from ocp_resources.namespace import Namespace


client = DynamicClient(client=kubernetes.config.new_client_from_config())

# The examples given below are relevant to all resources. For simplicity we will use the resource - Namespace.
Expand Down
1 change: 0 additions & 1 deletion examples/node_network_configuration_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
NodeNetworkConfigurationPolicy,
)


# Using capture syntax to switch ipv4 config between interfaces
my_nncp = NodeNetworkConfigurationPolicy(
name="capture_nncp",
Expand Down
1 change: 0 additions & 1 deletion examples/pods.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from ocp_resources.pod import Pod


client = DynamicClient(client=kubernetes.config.new_client_from_config())

# Query to get Pods (resource) in the connected cluster with label of ``label_example=example``.
Expand Down
1 change: 0 additions & 1 deletion examples/role.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from ocp_resources.role import Role


# The example bellow is also relevant for the ClusterRole resource.
# Add multiple rules to a specific Role or ClusterRole as a list of rules dictionaries:
rules = [
Expand Down
1 change: 0 additions & 1 deletion examples/virtual_machine.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from ocp_resources.virtual_machine import VirtualMachine


# Create a VM
with VirtualMachine(
name="vm-example",
Expand Down
1 change: 0 additions & 1 deletion ocp_resources/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
)
from urllib3.exceptions import MaxRetryError, ProtocolError


DEFAULT_CLUSTER_RETRY_EXCEPTIONS = {
MaxRetryError: [],
ConnectionAbortedError: [],
Expand Down
1 change: 0 additions & 1 deletion ocp_resources/event.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from ocp_resources.logger import get_logger


LOGGER = get_logger(name=__name__)


Expand Down
1 change: 0 additions & 1 deletion ocp_resources/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from colorlog import ColoredFormatter


LOGGER = logging.getLogger(__name__)
LOGGERS = {}

Expand Down
1 change: 0 additions & 1 deletion ocp_resources/machine_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from ocp_resources.resource import NamespacedResource
from ocp_resources.utils import TimeoutExpiredError, TimeoutSampler


TIMEOUT_5MINUTES = 300


Expand Down
1 change: 0 additions & 1 deletion ocp_resources/network_attachment_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from ocp_resources.resource import NamespacedResource


DEFAULT_CNI_VERSION = "0.3.1"


Expand Down
1 change: 0 additions & 1 deletion ocp_resources/node_network_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from ocp_resources.resource import Resource
from ocp_resources.utils import TimeoutSampler


SLEEP = 1


Expand Down
1 change: 0 additions & 1 deletion ocp_resources/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
skip_existing_resource_creation_teardown,
)


LOGGER = get_logger(__name__)
MAX_SUPPORTED_API_VERSION = "v2"

Expand Down
1 change: 0 additions & 1 deletion ocp_resources/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from ocp_resources.logger import get_logger


LOGGER = get_logger(name=__name__)


Expand Down
16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
[tool.black]
line-length = 88
target_version = ['py37', 'py38', 'py39', 'py310', "py311"]
exclude = '''
(
/(
| \.git
| \.venv
| \.mypy_cache
| \.tox
)/
)
'''

[tool.isort]
line_length = 88
profile = "black"


[build-system]
requires = ["setuptools>=61.2"]
Expand Down