From 7a32906b4b114279c1c4400b6f50e90e6969b622 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Sun, 17 Apr 2022 04:08:33 +1000 Subject: [PATCH] Enable flake8 rule W292 No newline at end of file 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 d18ad030cc74..823c9ada6087 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 d216be4ddc94..13a83393a912 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 d216be4ddc94..13a83393a912 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 d216be4ddc94..13a83393a912 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 d37fd4b56cd7..8068318fbb0a 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 a59ad5d11d75..ede2a8764fd0 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 @@ def error(self, func, msg=None): 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 c806f2927f22..32aa3e6f7f86 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 @@ ''' 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 c1868d009f94..6901da98a806 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 @@ def test_10_expunge_instance_in_network(self): 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 8b8694646cbe..812b3dcb4d7a 100644 --- a/test/integration/smoke/test_annotations.py +++ b/test/integration/smoke/test_annotations.py @@ -253,4 +253,4 @@ def test_06_add_adminsonly_and_update_annotation_visibility(self): # 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 9bd053b4f760..84f4c67ec4c8 100644 --- a/test/integration/smoke/test_network.py +++ b/test/integration/smoke/test_network.py @@ -2043,4 +2043,4 @@ def test_03_destroySharedNetwork(self): 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 9cb8da94b554..5ca3d6a506aa 100644 --- a/test/integration/smoke/test_persistent_network.py +++ b/test/integration/smoke/test_persistent_network.py @@ -398,4 +398,4 @@ def validate_persistent_network_resources_created_on_host(self, network_vlan): 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 c9b1bf837ba3..3f2d13dfad37 100644 --- a/test/integration/smoke/test_scale_vm.py +++ b/test/integration/smoke/test_scale_vm.py @@ -480,4 +480,4 @@ def test_03_scale_vm(self): 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 284d8961a576..4e451838dfa7 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