Skip to content

Commit

Permalink
library: make the code PEP 484 compliant
Browse files Browse the repository at this point in the history
Typical message:

```
PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
```

See https://github.com/hauntsaninja/no_implicit_optional for more details

Signed-off-by: Guillaume Abrioux <[email protected]>
(cherry picked from commit 986b144)
(cherry picked from commit 35fd60d)
  • Loading branch information
guits committed Feb 8, 2023
1 parent be06697 commit 8ed26c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/ceph_orch_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.

from __future__ import absolute_import, division, print_function
from typing import List, Tuple
from typing import Optional, List, Tuple
__metaclass__ = type

from ansible.module_utils.basic import AnsibleModule # type: ignore
Expand Down Expand Up @@ -134,7 +134,7 @@ def update_host(module: "AnsibleModule",
action: str,
name: str,
address: str = '',
labels: List[str] = None) -> Tuple[int, List[str], str, str]:
labels: Optional[List[str]] = None) -> Tuple[int, List[str], str, str]:
cmd = build_base_cmd_orch(module)
cmd.extend(['host', action, name])
if action == 'add' and address:
Expand Down

0 comments on commit 8ed26c4

Please sign in to comment.