mypy: Address issues with openstack.network

Just an incorrect type annotation to correct here. We need to figure out
a way to properly type the 'Resource' class with all its magic.

Change-Id: Id238b870de85a4663032710d1c15f6e200d2d543
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2023-07-26 17:32:03 +01:00
parent f8a0ec9a63
commit 4f8d4102f5
3 changed files with 1 additions and 7 deletions

View File

@ -66,7 +66,6 @@ repos:
| openstack/key_manager/.*
| openstack/load_balancer/.*
| openstack/message/.*
| openstack/network/.*
| openstack/object_store/.*
| openstack/orchestration/.*
| openstack/placement/.*

View File

@ -10,8 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import typing as ty
from openstack.common import tag
from openstack.network.v2 import _base
from openstack import resource
@ -59,9 +57,7 @@ class Port(_base.NetworkResource, tag.TagMixin):
# Properties
#: Allowed address pairs list. Dictionary key ``ip_address`` is required
#: and key ``mac_address`` is optional.
allowed_address_pairs: ty.List[dict] = resource.Body(
'allowed_address_pairs', type=list
)
allowed_address_pairs = resource.Body('allowed_address_pairs', type=list)
#: The ID of the host where the port is allocated. In some cases,
#: different implementations can run on different hosts.
binding_host_id = resource.Body('binding:host_id')

View File

@ -60,7 +60,6 @@ exclude = (?x)(
| openstack/key_manager
| openstack/load_balancer
| openstack/message
| openstack/network
| openstack/object_store
| openstack/orchestration
| openstack/placement