Reformat with blcak 25.1.0 - to match GitHub
Some checks failed
Lint / lint (push) Has been cancelled

This commit is contained in:
Pim van Pelt
2025-05-03 19:12:01 +02:00
parent 641d0f0190
commit 4e139d02f3
30 changed files with 41 additions and 41 deletions

View File

@ -13,4 +13,4 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" __init__.py added to suppress pylint error """
"""__init__.py added to suppress pylint error"""

View File

@ -13,7 +13,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" A vppcfg configuration module that exposes its semantic/syntax validators """
"""A vppcfg configuration module that exposes its semantic/syntax validators"""
from __future__ import (
absolute_import,
division,

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
""" A vppcfg configuration module that validates acls """
"""A vppcfg configuration module that validates acls"""
import logging
import socket
import ipaddress

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
""" A vppcfg configuration module that handles addresses """
"""A vppcfg configuration module that handles addresses"""
import ipaddress

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
""" A vppcfg configuration module that handles bondethernets """
"""A vppcfg configuration module that handles bondethernets"""
import logging
from . import interface
from . import mac

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
""" A vppcfg configuration module that handles bridgedomains """
"""A vppcfg configuration module that handles bridgedomains"""
import logging
from . import interface
from . import loopback

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
""" A vppcfg configuration module that validates interfaces """
"""A vppcfg configuration module that validates interfaces"""
import logging
from . import bondethernet
from . import bridgedomain

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
""" A vppcfg configuration module that validates Linux Control Plane (lcp) elements """
"""A vppcfg configuration module that validates Linux Control Plane (lcp) elements"""
def get_lcps(yaml, interfaces=True, loopbacks=True, bridgedomains=True):

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
""" A vppcfg configuration module that validates loopbacks """
"""A vppcfg configuration module that validates loopbacks"""
import logging
from . import lcp
from . import address

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
""" A vppcfg configuration module that validates MAC addresses """
"""A vppcfg configuration module that validates MAC addresses"""
import netaddr

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
""" A vppcfg configuration module that validates prefixlists """
"""A vppcfg configuration module that validates prefixlists"""
import logging
import ipaddress

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
""" A vppcfg configuration module that validates sflow config """
"""A vppcfg configuration module that validates sflow config"""
import logging

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
""" A vppcfg configuration module that validates taps """
"""A vppcfg configuration module that validates taps"""
import logging
from . import mac

View File

@ -12,7 +12,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" Unit tests for taps """
"""Unit tests for taps"""
import unittest
import yaml
from . import acl

View File

@ -12,7 +12,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" Unit tests for addresses """
"""Unit tests for addresses"""
import unittest
import yaml
from . import address

View File

@ -12,7 +12,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" Unit tests for bondethernet """
"""Unit tests for bondethernet"""
import unittest
import yaml
from . import bondethernet

View File

@ -12,7 +12,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" Unit tests for bridgedomains """
"""Unit tests for bridgedomains"""
import unittest
import yaml
from . import bridgedomain

View File

@ -12,7 +12,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" Unit tests for interfaces """
"""Unit tests for interfaces"""
import unittest
import yaml
from . import interface

View File

@ -12,7 +12,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" Unit tests for LCPs """
"""Unit tests for LCPs"""
import unittest
import yaml
from . import lcp

View File

@ -12,7 +12,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" Unit tests for loopbacks """
"""Unit tests for loopbacks"""
import unittest
import yaml
from . import loopback

View File

@ -12,7 +12,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" Unit tests for MAC addresses """
"""Unit tests for MAC addresses"""
import unittest
from . import mac

View File

@ -12,7 +12,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" Unit tests for taps """
"""Unit tests for taps"""
import unittest
import yaml
from . import prefixlist

View File

@ -12,7 +12,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" Unit tests for taps """
"""Unit tests for taps"""
import unittest
import yaml
from . import tap

View File

@ -12,7 +12,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" Unit tests for vxlan_tunnels """
"""Unit tests for vxlan_tunnels"""
import unittest
import yaml
from . import vxlan_tunnel

View File

@ -1,4 +1,4 @@
""" module to help locate unittest resources """
"""module to help locate unittest resources"""
#!/usr/bin/env python
#

View File

@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
""" A vppcfg configuration module that validates vxlan_tunnels """
"""A vppcfg configuration module that validates vxlan_tunnels"""
import logging
import ipaddress

View File

@ -13,7 +13,7 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" This is a unit test suite for vppcfg """
"""This is a unit test suite for vppcfg"""
# pylint: disable=duplicate-code
import os
import sys

View File

@ -13,4 +13,4 @@
# limitations under the License.
#
# -*- coding: utf-8 -*-
""" __init__.py added to suppress pylint error """
"""__init__.py added to suppress pylint error"""

View File

@ -309,9 +309,9 @@ class Dumper(VPPApi):
acl_rule.srcport_or_icmptype_first
)
else:
config_term[
"icmp-type"
] = f"{acl_rule.srcport_or_icmptype_first}-{maxval}"
config_term["icmp-type"] = (
f"{acl_rule.srcport_or_icmptype_first}-{maxval}"
)
maxval = acl_rule.dstport_or_icmpcode_last
if maxval > 255:
@ -324,9 +324,9 @@ class Dumper(VPPApi):
acl_rule.dstport_or_icmpcode_first
)
else:
config_term[
"icmp-code"
] = f"{acl_rule.dstport_or_icmpcode_first}-{maxval}"
config_term["icmp-code"] = (
f"{acl_rule.dstport_or_icmpcode_first}-{maxval}"
)
elif acl_rule.proto in [6, 17]:
if acl_rule.proto == 6:
config_term["protocol"] = "tcp"
@ -340,9 +340,9 @@ class Dumper(VPPApi):
acl_rule.srcport_or_icmptype_first
)
else:
config_term[
"source-port"
] = f"{acl_rule.srcport_or_icmptype_first}-{acl_rule.srcport_or_icmptype_last}"
config_term["source-port"] = (
f"{acl_rule.srcport_or_icmptype_first}-{acl_rule.srcport_or_icmptype_last}"
)
if (
acl_rule.dstport_or_icmpcode_first
== acl_rule.dstport_or_icmpcode_last
@ -351,9 +351,9 @@ class Dumper(VPPApi):
acl_rule.dstport_or_icmpcode_first
)
else:
config_term[
"destination-port"
] = f"{acl_rule.dstport_or_icmpcode_first}-{acl_rule.dstport_or_icmpcode_last}"
config_term["destination-port"] = (
f"{acl_rule.dstport_or_icmpcode_first}-{acl_rule.dstport_or_icmpcode_last}"
)
else:
config_term["protocol"] = int(acl_rule.proto)

View File

@ -14,7 +14,7 @@
#
# -*- coding: utf-8 -*-
"""vppcfg is a utility to configure a running VPP Dataplane using YAML
config files. See http://github.com/pimvanpelt/vppcfg/README.md for details. """
config files. See http://github.com/pimvanpelt/vppcfg/README.md for details."""
# pylint: disable=duplicate-code
import os
import sys