Skip to content

Commit 9564594

Browse files
committed
flake8: fix all lint errors
Fix all the lint errors reported by flake8. Exclude E131 and E501. Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
1 parent 5d7a364 commit 9564594

69 files changed

Lines changed: 914 additions & 937 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/add_bond.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#
1919

2020
import logging
21-
import time
2221

2322
import ovirtsdk4 as sdk
2423
import ovirtsdk4.types as types

examples/add_group.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#
1919

2020
import logging
21-
import time
2221

2322
import ovirtsdk4 as sdk
2423
import ovirtsdk4.types as types

examples/add_lun_disk_to_vm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#
1919

2020
import logging
21-
import time
2221

2322
import ovirtsdk4 as sdk
2423
import ovirtsdk4.types as types

examples/add_role.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#
1919

2020
import logging
21-
import time
2221

2322
import ovirtsdk4 as sdk
2423
import ovirtsdk4.types as types

examples/add_vm_snapshot.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828

2929
# Create the connection to the server:
3030
connection = sdk.Connection(
31-
url='https://engine40.example.com/ovirt-engine/api',
32-
username='admin@internal',
33-
password='redhat123',
34-
ca_file='ca.pem',
35-
debug=True,
36-
log=logging.getLogger(),
31+
url='https://engine40.example.com/ovirt-engine/api',
32+
username='admin@internal',
33+
password='redhat123',
34+
ca_file='ca.pem',
35+
debug=True,
36+
log=logging.getLogger(),
3737
)
3838

3939
# Locate the virtual machines service and use it to find the virtual
@@ -46,9 +46,9 @@
4646

4747
# Add the new snapshot:
4848
snapshots_service.add(
49-
types.Snapshot(
50-
description='My snapshot',
51-
),
49+
types.Snapshot(
50+
description='My snapshot',
51+
),
5252
)
5353

5454
# Close the connection to the server:

examples/assign_affinity_label_to_vm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,3 @@
6868
)
6969
# Close the connection to the server:
7070
connection.close()
71-

examples/assign_tag_to_vm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,3 @@
5757

5858
# Close the connection to the server:
5959
connection.close()
60-

examples/asynchronous_inventory.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,22 @@
3636
# of connections multiplied by the size of the pipeline:
3737
block = connections * pipeline
3838

39+
3940
# This method is taken from itertools recipes:
4041
# https://docs.python.org/3/library/itertools.html
4142
def grouper(iterable, n, fillvalue=None):
4243
args = [iter(iterable)] * n
4344
return zip_longest(fillvalue=fillvalue, *args)
4445

46+
4547
# This function takes a list of objects and creates a hash where the keys are
4648
# the identifiers and the values are the objects. We will use it to create
4749
# indexes that we can use to speed up things like finding the disks
4850
# corresponding to a virtual machine, given their identifiers.
4951
def index(vals):
5052
return {item.id: item for item in vals}
5153

54+
5255
# In order to download large collections of objects, it is convenient to use a
5356
# different HTTP connection for each of them, so that they are downloaded in
5457
# parallel. To achieve that we need to configure the connection so that it uses

examples/cancel_transfer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"""
2020

2121
import argparse
22+
import getpass
2223
import logging
2324

2425
from contextlib import closing

examples/change_host_cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
),
6565
)
6666

67-
# Activate the host again:
67+
# Activate the host again:
6868
host_service.activate()
6969
while True:
7070
time.sleep(5)

0 commit comments

Comments
 (0)