Skip to content

Commit

Permalink
Use new python import sorter
Browse files Browse the repository at this point in the history
  • Loading branch information
iranzo committed Aug 22, 2024
1 parent 49d0516 commit b644ba7
Show file tree
Hide file tree
Showing 72 changed files with 17 additions and 203 deletions.
7 changes: 0 additions & 7 deletions .isort.cfg

This file was deleted.

13 changes: 5 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,8 @@ repos:
# - id: yaspeller
# types:
# - markdown
- hooks:
- id: seed-isort-config
repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
- hooks:
- id: isort
repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1

- repo: https://github.com/asottile/reorder-python-imports
rev: v3.13.0
hooks:
- id: reorder-python-imports
1 change: 0 additions & 1 deletion citellus.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (C) 2017 Robin Černín <[email protected]>
# Copyright (C) 2017, 2018, 2020, 2021 Pablo Iranzo Gómez <[email protected]>
import sys
Expand Down
6 changes: 0 additions & 6 deletions doc/templates/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017, 2018 Pablo Iranzo Gómez <[email protected]>

#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
Expand All @@ -22,12 +19,9 @@
# bugzilla: bz url
# priority: 0<>1000 for likelihood to break your environment if this test reports fail
# kb: url-to-kbase

# Note a more pythonic way of running 'main' could be implemented by:
# Running tests as new functions like:
# def check_nova_debug(root=RISU_ROOT) and calling it inside the live or not live checks (or both)


from __future__ import print_function

import os
Expand Down
1 change: 0 additions & 1 deletion maguiclient/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (C) 2018, 2020 Pablo Iranzo Gómez <[email protected]>
2 changes: 0 additions & 2 deletions maguiclient/hooks/data/0/fail-faraday.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
#
# Description: Hook for making as failed faraday plugins
# Author: Pablo Iranzo Gomez ([email protected])

# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
3 changes: 0 additions & 3 deletions maguiclient/magui.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import print_function

import argparse
Expand Down
1 change: 0 additions & 1 deletion maguiclient/plugins/core/faraday-magui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# -*- coding: utf-8 -*-
# Description: Plugin for reporting failed affinity on the faraday risu plugin
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
3 changes: 0 additions & 3 deletions maguiclient/plugins/core/metadata-outputs.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Description: Plugin for reporting back risu metadata from all sosreports

# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>


from __future__ import print_function

import os
Expand Down
3 changes: 0 additions & 3 deletions maguiclient/plugins/core/risu-outputs.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Description: Plugin for reporting back risu data from all sosreports#

# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>


from __future__ import print_function

import os
Expand Down
2 changes: 0 additions & 2 deletions maguiclient/plugins/openstack/mysql/seqno.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Description: Plugin for checking galera/mysql sequence number across servers
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

try:
Expand Down
2 changes: 0 additions & 2 deletions maguiclient/plugins/system/mtu.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#
# Description: Plugin for reporting non equal mtu values
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>


from __future__ import print_function

import os
Expand Down
2 changes: 0 additions & 2 deletions maguiclient/plugins/system/multipathluns.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#
# Description: Plugin for reporting non equal mpath values
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>


from __future__ import print_function

import os
Expand Down
2 changes: 0 additions & 2 deletions maguiclient/plugins/system/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#
# Description: Plugin for checking RH Release across hosts
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>


from __future__ import print_function

try:
Expand Down
4 changes: 0 additions & 4 deletions refresh-contributors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
#
# Description: Script to update contributors for each plugin
# Copyright (C) 2018-2023 Pablo Iranzo Gómez <[email protected]>

# Find files that misses the header:
# for file in $(find . -type f|grep -v .git|grep -v pyc|grep -v .risu_tests|grep -E '(.py|.txt|.yml|.sh)$'); do grep -q "^# Modifications" $file|| echo $file;done

# How to use:
# python setup.py sdist # To create AUTHORS
# ./refresh-contributors.py
# Check results on your git repo and commit a new PR


import os
import re
import shutil
Expand Down
1 change: 0 additions & 1 deletion risu.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (C) 2021 Pablo Iranzo Gómez <[email protected]>
import sys

Expand Down
1 change: 0 additions & 1 deletion risu/magui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Robin Černín <[email protected]>
# Copyright (C) 2017-2022 Pablo Iranzo Gómez <[email protected]>

import os
import sys

Expand Down
1 change: 0 additions & 1 deletion risu/risu.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Copyright (C) 2017 Robin Černín <[email protected]>
# Copyright (C) 2017 Lars Kellogg-Stedman <[email protected]>
# Copyright (C) 2017-2022 Pablo Iranzo Gómez <[email protected]>

import os
import sys

Expand Down
1 change: 0 additions & 1 deletion risuclient/extensions/ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Extension for processing ansible playbooks
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2017-2022 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
1 change: 0 additions & 1 deletion risuclient/extensions/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Extension for processing core Risu plugins
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2017-2022 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
1 change: 0 additions & 1 deletion risuclient/extensions/faraday-exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2018 Robin Černín <[email protected]>
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
1 change: 0 additions & 1 deletion risuclient/extensions/faraday.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import hashlib
Expand Down
1 change: 0 additions & 1 deletion risuclient/extensions/golang.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Extension for processing GOlang Risu plugins
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2020, 2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
1 change: 0 additions & 1 deletion risuclient/extensions/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Extension for running and reporting metadata
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
1 change: 0 additions & 1 deletion risuclient/extensions/nagios.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Extension for processing nagios Risu plugins
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
1 change: 0 additions & 1 deletion risuclient/extensions/node-problem-detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2019-2021, 2023 Pablo Iranzo Gómez <[email protected]>
#

from __future__ import print_function

import json
Expand Down
2 changes: 0 additions & 2 deletions risuclient/extensions/rhv-log-collector-analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# Description: Extension for processing rhv-log-collector-analizer
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>


from __future__ import print_function

import os
Expand Down
1 change: 0 additions & 1 deletion risuclient/extensions/tripleo-common-healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Extension for processing tripleo-common-healthcheck playbooks
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
1 change: 0 additions & 1 deletion risuclient/extensions/winston.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>
#
# https://en.wikipedia.org/wiki/Winston_Smith

from __future__ import print_function

import os
Expand Down
1 change: 0 additions & 1 deletion risuclient/hooks/data/0/faraday-exec/merge-with-faraday.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2018 Robin Černín <[email protected]>
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Hook for integrating insights execution json into risu results
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2020, 2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import glob
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Hook for moving MTU global results to individual tests results
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Hook for moving Mpath global results to individual tests results
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
1 change: 0 additions & 1 deletion risuclient/hooks/data/9/faraday-to-individual.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Hook for moving faraday results to individual ones
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#
# Description: Hook for moving rhv-log-collector-analyzer results to individual tests results
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import json
Expand Down
1 change: 0 additions & 1 deletion risuclient/hooks/data/9/system/unfail-chronyd-with-ntpd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Hook for removing failed chronyd status when ntpd is ok
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Hook for removing failed firewall status when node is openstack
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
1 change: 0 additions & 1 deletion risuclient/hooks/data/9/system/unfail-ntpd-with-chronyd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Hook for removing failed ntpd status when chronyd is ok
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import os
Expand Down
1 change: 0 additions & 1 deletion risuclient/hooks/profiles/profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Description: Hook for procesing profile definitions and appending results formated to json
# Author: Pablo Iranzo Gomez ([email protected])
# Copyright (C) 2018-2021, 2023 Pablo Iranzo Gómez <[email protected]>

from __future__ import print_function

import json
Expand Down
1 change: 0 additions & 1 deletion risuclient/magui.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2018-2020, 2023 Pablo Iranzo Gómez <[email protected]>

import os
import sys

Expand Down
Loading

0 comments on commit b644ba7

Please sign in to comment.