diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index efc83cd..7b8bdb8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,10 @@ --- +ci: + skip: + # pre-commit.ci has trouble with this one + - update-docs + - end-of-file-fixer + - trailing-whitespace repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.1.0 diff --git a/changelogs/fragments/enable_upgrade_black.yml b/changelogs/fragments/enable_upgrade_black.yml new file mode 100644 index 0000000..fe6fc5f --- /dev/null +++ b/changelogs/fragments/enable_upgrade_black.yml @@ -0,0 +1,4 @@ +--- +trivial: + - Enable black via pre-commit.ci + - Update black version to latest diff --git a/changelogs/fragments/pre-commit-skip.yml b/changelogs/fragments/pre-commit-skip.yml new file mode 100644 index 0000000..efe85b1 --- /dev/null +++ b/changelogs/fragments/pre-commit-skip.yml @@ -0,0 +1,6 @@ +--- +trivial: + - Exempt update-docs from pre-commit.ci + - Disable black temporarily until it can be upgraded + - Disable end-of-file-fixer + - Disable trailing-whitespace diff --git a/tests/integration/targets/utils_cli_parse/files/nxos_show_version.txt b/tests/integration/targets/utils_cli_parse/files/nxos_show_version.txt index d5a63e8..47ade78 100644 --- a/tests/integration/targets/utils_cli_parse/files/nxos_show_version.txt +++ b/tests/integration/targets/utils_cli_parse/files/nxos_show_version.txt @@ -34,4 +34,4 @@ Kernel uptime is 110 day(s), 12 hour(s), 32 minute(s), 10 second(s) plugin Core Plugin, Ethernet Plugin -Active Package(s) \ No newline at end of file +Active Package(s) diff --git a/tests/integration/targets/utils_cli_parse/output/nxos_show_interface_json_text.txt b/tests/integration/targets/utils_cli_parse/output/nxos_show_interface_json_text.txt index 5fc41f7..3d3c383 100644 --- a/tests/integration/targets/utils_cli_parse/output/nxos_show_interface_json_text.txt +++ b/tests/integration/targets/utils_cli_parse/output/nxos_show_interface_json_text.txt @@ -15,4 +15,4 @@ } ] ] -] \ No newline at end of file +] diff --git a/tests/integration/targets/utils_cli_parse/output/nxos_show_interface_ttp_parsed.json b/tests/integration/targets/utils_cli_parse/output/nxos_show_interface_ttp_parsed.json index 5fc41f7..3d3c383 100644 --- a/tests/integration/targets/utils_cli_parse/output/nxos_show_interface_ttp_parsed.json +++ b/tests/integration/targets/utils_cli_parse/output/nxos_show_interface_ttp_parsed.json @@ -15,4 +15,4 @@ } ] ] -] \ No newline at end of file +] diff --git a/tests/integration/targets/utils_cli_parse/templates/centos_df_-h.ttp b/tests/integration/targets/utils_cli_parse/templates/centos_df_-h.ttp index ddd709d..75b4875 100644 --- a/tests/integration/targets/utils_cli_parse/templates/centos_df_-h.ttp +++ b/tests/integration/targets/utils_cli_parse/templates/centos_df_-h.ttp @@ -1 +1 @@ -Filesystem Size Used Avail Use Mounted_on {{ _headers_ }} \ No newline at end of file +Filesystem Size Used Avail Use Mounted_on {{ _headers_ }} diff --git a/tests/integration/targets/utils_cli_parse/templates/centos_ifconfig.textfsm b/tests/integration/targets/utils_cli_parse/templates/centos_ifconfig.textfsm index 4c339c2..b16da4e 100644 --- a/tests/integration/targets/utils_cli_parse/templates/centos_ifconfig.textfsm +++ b/tests/integration/targets/utils_cli_parse/templates/centos_ifconfig.textfsm @@ -16,4 +16,4 @@ Start ^${Interface}:.* mtu ${MTU} ^\s+ether ${MAC} ^\s+inet6 ${Inet6} prefixlen ${Prefix} - ^\s+inet ${Inet} netmask ${Netmask} \ No newline at end of file + ^\s+inet ${Inet} netmask ${Netmask} diff --git a/tests/integration/targets/utils_cli_parse/templates/fedora_df_-h.ttp b/tests/integration/targets/utils_cli_parse/templates/fedora_df_-h.ttp index ddd709d..75b4875 100644 --- a/tests/integration/targets/utils_cli_parse/templates/fedora_df_-h.ttp +++ b/tests/integration/targets/utils_cli_parse/templates/fedora_df_-h.ttp @@ -1 +1 @@ -Filesystem Size Used Avail Use Mounted_on {{ _headers_ }} \ No newline at end of file +Filesystem Size Used Avail Use Mounted_on {{ _headers_ }} diff --git a/tests/integration/targets/utils_cli_parse/templates/fedora_ifconfig.textfsm b/tests/integration/targets/utils_cli_parse/templates/fedora_ifconfig.textfsm index 4c339c2..b16da4e 100644 --- a/tests/integration/targets/utils_cli_parse/templates/fedora_ifconfig.textfsm +++ b/tests/integration/targets/utils_cli_parse/templates/fedora_ifconfig.textfsm @@ -16,4 +16,4 @@ Start ^${Interface}:.* mtu ${MTU} ^\s+ether ${MAC} ^\s+inet6 ${Inet6} prefixlen ${Prefix} - ^\s+inet ${Inet} netmask ${Netmask} \ No newline at end of file + ^\s+inet ${Inet} netmask ${Netmask} diff --git a/tests/integration/targets/utils_cli_parse/templates/ubuntu_df_-h.ttp b/tests/integration/targets/utils_cli_parse/templates/ubuntu_df_-h.ttp index ddd709d..75b4875 100644 --- a/tests/integration/targets/utils_cli_parse/templates/ubuntu_df_-h.ttp +++ b/tests/integration/targets/utils_cli_parse/templates/ubuntu_df_-h.ttp @@ -1 +1 @@ -Filesystem Size Used Avail Use Mounted_on {{ _headers_ }} \ No newline at end of file +Filesystem Size Used Avail Use Mounted_on {{ _headers_ }} diff --git a/tests/integration/targets/utils_cli_parse/templates/ubuntu_ifconfig.textfsm b/tests/integration/targets/utils_cli_parse/templates/ubuntu_ifconfig.textfsm index 4c339c2..b16da4e 100644 --- a/tests/integration/targets/utils_cli_parse/templates/ubuntu_ifconfig.textfsm +++ b/tests/integration/targets/utils_cli_parse/templates/ubuntu_ifconfig.textfsm @@ -16,4 +16,4 @@ Start ^${Interface}:.* mtu ${MTU} ^\s+ether ${MAC} ^\s+inet6 ${Inet6} prefixlen ${Prefix} - ^\s+inet ${Inet} netmask ${Netmask} \ No newline at end of file + ^\s+inet ${Inet} netmask ${Netmask} diff --git a/tests/integration/targets/utils_ipaddr_filter/vars/main.yaml b/tests/integration/targets/utils_ipaddr_filter/vars/main.yaml index 15bc0d2..6a87ef7 100644 --- a/tests/integration/targets/utils_ipaddr_filter/vars/main.yaml +++ b/tests/integration/targets/utils_ipaddr_filter/vars/main.yaml @@ -40,7 +40,7 @@ ipwrap_result1: - "[fe80::100]/10" - "[2001:db8:32c:faad::]/64" - True - + ipv6_result1: - "::ffff:192.168.32.0/120" - "::ffff:192.24.2.1/128" diff --git a/tests/integration/targets/utils_validate/files/criteria/check_list_data.json b/tests/integration/targets/utils_validate/files/criteria/check_list_data.json index d45e16c..77efa81 100644 --- a/tests/integration/targets/utils_validate/files/criteria/check_list_data.json +++ b/tests/integration/targets/utils_validate/files/criteria/check_list_data.json @@ -14,4 +14,4 @@ ], "default": 0 } -} \ No newline at end of file +} diff --git a/tests/integration/targets/utils_validate/files/criteria/crc_error_check.json b/tests/integration/targets/utils_validate/files/criteria/crc_error_check.json index 66c43ca..9e9d3e7 100644 --- a/tests/integration/targets/utils_validate/files/criteria/crc_error_check.json +++ b/tests/integration/targets/utils_validate/files/criteria/crc_error_check.json @@ -15,4 +15,4 @@ } } } -} \ No newline at end of file +} diff --git a/tests/integration/targets/utils_validate/files/criteria/enabled_check.json b/tests/integration/targets/utils_validate/files/criteria/enabled_check.json index dde7c05..5dbe4f3 100644 --- a/tests/integration/targets/utils_validate/files/criteria/enabled_check.json +++ b/tests/integration/targets/utils_validate/files/criteria/enabled_check.json @@ -10,4 +10,4 @@ } } } -} \ No newline at end of file +} diff --git a/tests/integration/targets/utils_validate/files/criteria/in_rate_check.json b/tests/integration/targets/utils_validate/files/criteria/in_rate_check.json index 94614ea..6bc0b9c 100644 --- a/tests/integration/targets/utils_validate/files/criteria/in_rate_check.json +++ b/tests/integration/targets/utils_validate/files/criteria/in_rate_check.json @@ -19,4 +19,4 @@ } } } -} \ No newline at end of file +} diff --git a/tests/integration/targets/utils_validate/files/criteria/oper_status_up.json b/tests/integration/targets/utils_validate/files/criteria/oper_status_up.json index 2f5803a..2c5ce0f 100644 --- a/tests/integration/targets/utils_validate/files/criteria/oper_status_up.json +++ b/tests/integration/targets/utils_validate/files/criteria/oper_status_up.json @@ -11,4 +11,4 @@ } } } -} \ No newline at end of file +} diff --git a/tests/unit/module_utils/fixtures/large.json b/tests/unit/module_utils/fixtures/large.json index 51b7509..fa6b6b9 100644 --- a/tests/unit/module_utils/fixtures/large.json +++ b/tests/unit/module_utils/fixtures/large.json @@ -55315,4 +55315,4 @@ }, "xmlns": "http://cisco.com/ns/yang/cisco-nx-os-device" } -} \ No newline at end of file +} diff --git a/tests/unit/plugins/action/fixtures/nxos_show_version.txt b/tests/unit/plugins/action/fixtures/nxos_show_version.txt index a50e668..b797d71 100644 --- a/tests/unit/plugins/action/fixtures/nxos_show_version.txt +++ b/tests/unit/plugins/action/fixtures/nxos_show_version.txt @@ -35,4 +35,4 @@ Last reset plugin Core Plugin, Ethernet Plugin -Active Package(s): \ No newline at end of file +Active Package(s): diff --git a/tests/unit/plugins/sub_plugins/cli_parsers/fixtures/nxos_show_version.cfg b/tests/unit/plugins/sub_plugins/cli_parsers/fixtures/nxos_show_version.cfg index e5cad05..c4c36b8 100644 --- a/tests/unit/plugins/sub_plugins/cli_parsers/fixtures/nxos_show_version.cfg +++ b/tests/unit/plugins/sub_plugins/cli_parsers/fixtures/nxos_show_version.cfg @@ -12,15 +12,15 @@ http://www.gnu.org/licenses/gpl.html. Nexus 9000v is a demo version of the Nexus Operating System Software - BIOS: version + BIOS: version NXOS: version 7.0(3)I7(1) - BIOS compile time: + BIOS compile time: NXOS image file is: bootflash:///nxos.7.0.3.I7.1.bin NXOS compile time: 8/31/2017 14:00:00 [08/31/2017 22:29:32] Hardware - cisco Nexus9000 9000v Chassis + cisco Nexus9000 9000v Chassis with 4041236 kB of memory. Processor Board ID 96NK4OUJH32 @@ -28,10 +28,10 @@ Hardware bootflash: 3509454 kB Kernel uptime is 12 day(s), 23 hour(s), 48 minute(s), 10 second(s) -Last reset +Last reset Reason: Unknown - System version: - Service: + System version: + Service: plugin Core Plugin, Ethernet Plugin diff --git a/tests/unit/plugins/sub_plugins/cli_parsers/fixtures/nxos_show_version.ttp b/tests/unit/plugins/sub_plugins/cli_parsers/fixtures/nxos_show_version.ttp index c46fc62..8880886 100644 --- a/tests/unit/plugins/sub_plugins/cli_parsers/fixtures/nxos_show_version.ttp +++ b/tests/unit/plugins/sub_plugins/cli_parsers/fixtures/nxos_show_version.ttp @@ -4,4 +4,4 @@ Kernel uptime is {{ uptime | ORPHRASE }} cisco Nexus9000 {{ platform }} Chassis -""" \ No newline at end of file +"""