From 7ba43e447cda736f04d0b38088b554e5169c8952 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Thu, 30 Jun 2022 16:38:27 +1000 Subject: [PATCH] Enable flake8 rule W292 No newline at end of file (#6274) https://www.flake8rules.com/rules/W292.html --- .github/linters/.flake8 | 2 +- api/test/integration/api/__init__.py | 2 +- api/test/integration/api/test/__init__.py | 2 +- api/test/integration/api/test/account/__init__.py | 2 +- .../security_group_agent/security_group_agent/xmlobject.py | 2 +- .../ovm/src/main/scripts/vm/hypervisor/ovm/OvmLoggerModule.py | 2 +- .../ovm/src/main/scripts/vm/hypervisor/ovm/OvmObjectModule.py | 2 +- test/integration/broken/test_vpc_vm_life_cycle.py | 2 +- test/integration/smoke/test_annotations.py | 2 +- test/integration/smoke/test_network.py | 2 +- test/integration/smoke/test_persistent_network.py | 2 +- test/integration/smoke/test_scale_vm.py | 2 +- test/selenium/lib/initialize.py | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/linters/.flake8 b/.github/linters/.flake8 index d18ad030cc7..823c9ada608 100644 --- a/.github/linters/.flake8 +++ b/.github/linters/.flake8 @@ -16,4 +16,4 @@ # under the License. [flake8] -select = W291,W293 +select = W291,W292,W293 diff --git a/api/test/integration/api/__init__.py b/api/test/integration/api/__init__.py index d216be4ddc9..13a83393a91 100644 --- a/api/test/integration/api/__init__.py +++ b/api/test/integration/api/__init__.py @@ -13,4 +13,4 @@ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations -# under the License. \ No newline at end of file +# under the License. diff --git a/api/test/integration/api/test/__init__.py b/api/test/integration/api/test/__init__.py index d216be4ddc9..13a83393a91 100644 --- a/api/test/integration/api/test/__init__.py +++ b/api/test/integration/api/test/__init__.py @@ -13,4 +13,4 @@ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations -# under the License. \ No newline at end of file +# under the License. diff --git a/api/test/integration/api/test/account/__init__.py b/api/test/integration/api/test/account/__init__.py index d216be4ddc9..13a83393a91 100644 --- a/api/test/integration/api/test/account/__init__.py +++ b/api/test/integration/api/test/account/__init__.py @@ -13,4 +13,4 @@ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations -# under the License. \ No newline at end of file +# under the License. diff --git a/plugins/hypervisors/baremetal/src/main/resources/security_group_agent/security_group_agent/xmlobject.py b/plugins/hypervisors/baremetal/src/main/resources/security_group_agent/security_group_agent/xmlobject.py index d37fd4b56cd..8068318fbb0 100755 --- a/plugins/hypervisors/baremetal/src/main/resources/security_group_agent/security_group_agent/xmlobject.py +++ b/plugins/hypervisors/baremetal/src/main/resources/security_group_agent/security_group_agent/xmlobject.py @@ -94,4 +94,4 @@ def _loads(node): def loads(xmlstr): xmlstr = re.sub(r'xmlns=".*"', '', xmlstr) root = etree.fromstring(xmlstr) - return _loads(root) \ No newline at end of file + return _loads(root) diff --git a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmLoggerModule.py b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmLoggerModule.py index a59ad5d11d7..ede2a8764fd 100755 --- a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmLoggerModule.py +++ b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmLoggerModule.py @@ -51,4 +51,4 @@ class OvmLogger(object): def warning(self, func, msg=None): assert callable(func), "%s is not a function"%func fmt = "[%s.%s]: "%(self.className, func.__name__) - self.logger.warning("%s%s"%(fmt,msg)) \ No newline at end of file + self.logger.warning("%s%s"%(fmt,msg)) diff --git a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmObjectModule.py b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmObjectModule.py index c806f2927f2..32aa3e6f7f8 100755 --- a/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmObjectModule.py +++ b/plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmObjectModule.py @@ -20,4 +20,4 @@ Created on May 17, 2011 ''' class OvmObject(object): - pass \ No newline at end of file + pass diff --git a/test/integration/broken/test_vpc_vm_life_cycle.py b/test/integration/broken/test_vpc_vm_life_cycle.py index 9290835c2e6..a8cbb3e45a3 100644 --- a/test/integration/broken/test_vpc_vm_life_cycle.py +++ b/test/integration/broken/test_vpc_vm_life_cycle.py @@ -789,4 +789,4 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): id=self.lb_rule.id, listall=True ) - return \ No newline at end of file + return diff --git a/test/integration/smoke/test_annotations.py b/test/integration/smoke/test_annotations.py index 8b8694646cb..812b3dcb4d7 100644 --- a/test/integration/smoke/test_annotations.py +++ b/test/integration/smoke/test_annotations.py @@ -253,4 +253,4 @@ class TestAnnotations(cloudstackTestCase): # Remove the annotation self.removeAnnotation(annotation_id) - del self.added_annotations[-1] \ No newline at end of file + del self.added_annotations[-1] diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py index 9bd053b4f76..84f4c67ec4c 100644 --- a/test/integration/smoke/test_network.py +++ b/test/integration/smoke/test_network.py @@ -2043,4 +2043,4 @@ class TestSharedNetwork(cloudstackTestCase): len(nic_ip_address), 0, "Failed to find the placeholder IP" - ) \ No newline at end of file + ) diff --git a/test/integration/smoke/test_persistent_network.py b/test/integration/smoke/test_persistent_network.py index 9cb8da94b55..5ca3d6a506a 100644 --- a/test/integration/smoke/test_persistent_network.py +++ b/test/integration/smoke/test_persistent_network.py @@ -398,4 +398,4 @@ class TestL2PersistentNetworks(cloudstackTestCase): 0, "Failed to find bridge on the breth1-" + str(network_vlan)) elif self.hypervisor.lower() in ["xenserver", "vmware"]: - self.verify_network_setup_on_host_per_cluster(self.hypervisor.lower(), network_vlan) \ No newline at end of file + self.verify_network_setup_on_host_per_cluster(self.hypervisor.lower(), network_vlan) diff --git a/test/integration/smoke/test_scale_vm.py b/test/integration/smoke/test_scale_vm.py index c9b1bf837ba..3f2d13dfad3 100644 --- a/test/integration/smoke/test_scale_vm.py +++ b/test/integration/smoke/test_scale_vm.py @@ -480,4 +480,4 @@ class TestScaleVm(cloudstackTestCase): else: self.fail("Expected an exception to be thrown, failing") - return \ No newline at end of file + return diff --git a/test/selenium/lib/initialize.py b/test/selenium/lib/initialize.py index 284d8961a57..4e451838dfa 100644 --- a/test/selenium/lib/initialize.py +++ b/test/selenium/lib/initialize.py @@ -43,4 +43,4 @@ def getMSip(): for arg in sys.argv[1:]: MS_ip = arg - return MS_ip \ No newline at end of file + return MS_ip