File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1+ minor_changes :
2+ - nmcli - fix comparison of type (https://github.com/ansible-collections/community.general/pull/11121).
Original file line number Diff line number Diff line change @@ -2489,7 +2489,7 @@ def show_connection(self):
24892489 if key and len (pair ) > 1 :
24902490 raw_value = pair [1 ].lstrip ()
24912491 if raw_value == "--" :
2492- if key_type == list :
2492+ if key_type is list :
24932493 conn_info [key ] = []
24942494 else :
24952495 conn_info [key ] = None
@@ -2504,7 +2504,7 @@ def show_connection(self):
25042504 conn_info [alias_key ] = alias_value
25052505 elif key in ("ipv4.routes" , "ipv6.routes" ):
25062506 conn_info [key ] = [s .strip () for s in raw_value .split (";" )]
2507- elif key_type == list :
2507+ elif key_type is list :
25082508 conn_info [key ] = [s .strip () for s in raw_value .split ("," )]
25092509 else :
25102510 m_enum = p_enum_value .match (raw_value )
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ ignore = [
2121 " B905" , # zip-without-explicit-strict - needs Python 3.10+
2222 " UP045" , # Use `X | None` for type annotations - needs Python 3.10+
2323 # To fix:
24- " E721" , # Type comparison
2524 " UP014" , # Convert `xxx` from `NamedTuple` functional to class syntax
2625 " UP024" , # Replace aliased errors with `OSError`
2726 " UP028" , # Replace `yield` over `for` loop with `yield from`
You can’t perform that action at this time.
0 commit comments