Skip to content

Commit

Permalink
Merge pull request ceph#32597 from sebastian-philipp/mgr-mypy-mgr_uti…
Browse files Browse the repository at this point in the history
…l-mgr_module

pyind/mgr: add mgr_module.py and mgr_util.py to mypy

Reviewed-by: Kefu Chai <[email protected]>
  • Loading branch information
sebastian-philipp authored Jan 13, 2020
2 parents 1c5f0e9 + adb2ed8 commit 24aa280
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pybind/mgr/mgr_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def merge_dicts(*args):


def get_default_addr():
# type: () -> str
def is_ipv6_enabled():
try:
sock = socket.socket(socket.AF_INET6)
Expand All @@ -119,6 +120,7 @@ class ServerConfigException(Exception):
pass

def verify_cacrt(cert_fname):
# type: (str) -> None
"""Basic validation of a ca cert"""

if not cert_fname:
Expand All @@ -139,6 +141,7 @@ def verify_cacrt(cert_fname):


def verify_tls_files(cert_fname, pkey_fname):
# type: (str, str) -> None
"""Basic checks for TLS certificate and key files
Do some validations to the private key and certificate:
Expand Down
2 changes: 2 additions & 0 deletions src/pybind/mgr/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ deps =
commands = mypy --config-file=../../mypy.ini \
ansible/module.py \
cephadm/module.py \
mgr_module.py \
mgr_util.py \
orchestrator.py \
orchestrator_cli/module.py \
rook/module.py \
Expand Down

0 comments on commit 24aa280

Please sign in to comment.