Skip to content

Commit 8e53802

Browse files
authored
Enable Flake8 rule W391 (#6606)
Best practice is to have one blank line at the end of Python files. Remove unneeded blank lines from the end of files
1 parent e65c22d commit 8e53802

File tree

76 files changed

+7
-147
lines changed

Some content is hidden

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

76 files changed

+7
-147
lines changed

.github/linters/.flake8

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,10 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
# W291 Trailing whitespace
19+
# W292 No newline at end of file
20+
# W293 Blank line contains whitespace
21+
# W391 Blank line at end of file
22+
1823
[flake8]
19-
select = W291,W292,W293
24+
select = W291,W292,W293,W391

cloud-cli/cloudapis/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,3 @@ def lookup_api(api_name):
4040
else: api = matchingapi[0]
4141
if api: api = getattr(api,"implementor")
4242
return api
43-

cloud-cli/cloudapis/cloud.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,5 +194,3 @@ def %s(%s):
194194
implementor = CloudAPI
195195

196196
del name,meth,describe,load_dynamic_methods
197-
198-

plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/ConfigFileOps.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,3 @@ def backup(self):
172172
self.add_lines(oldLine, False)
173173
else:
174174
self.replace_lines(newLine, oldLine, False)
175-

plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmCommonModule.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,3 @@ def makeOwnerFileName():
156156
hostIp = successToMap(get_master_ip())['ip']
157157
ownerFileName = OWNER_FILE_PREFIX + hostIp.replace('.', '_')
158158
return ownerFileName
159-

plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmHaHeartBeatModule.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,3 @@ def setupHeartBeat():
102102
stopOldHeartBeat(pid)
103103

104104
setupHeartBeat()
105-

plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmOCFS2Module.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,3 @@ def _start(self, cluster):
7777
doCmd(cmd)
7878
cmd = ['service o2cb start %s'%cluster]
7979
doCmd(cmd)
80-

plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmSecurityGroupModule.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -438,41 +438,3 @@ def check_rule_log_for_vm(vm_name, vm_id, vm_ip, dom_id, signature, seqno):
438438
return [True, True, True, True, True, True]
439439

440440
return [(vm_name != _vm_name), (vm_id != _vm_id), (vm_ip != _vm_ip), (dom_id != _dom_id), (signature != _signature), (seqno != _seqno)]
441-
442-
443-
444-
445-
446-
447-
448-
449-
450-
451-
452-
453-
454-
455-
456-
457-
458-
459-
460-
461-
462-
463-
464-
465-
466-
467-
468-
469-
470-
471-
472-
473-
474-
475-
476-
477-
478-

plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmStoragePoolModule.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,5 +427,3 @@ def copyToPrimary(secMountPoint, volumeFolderOnSecStorage, volumePath, primaryMo
427427
errmsg = fmt_err_msg(e)
428428
logger.error(OvmStoragePool.copyVolume, errmsg)
429429
raise XmlRpcFault(toErrCode(OvmStoragePool, OvmStoragePool.copyVolume), errmsg)
430-
431-

plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmVolumeModule.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,3 @@ def destroy(poolUuid, path):
153153

154154
if __name__ == "__main__":
155155
print OvmVolume.detachOrAttachIso(sys.argv[1], '', False)
156-
157-
158-

0 commit comments

Comments
 (0)