Skip to content

cephadm: use src/mypy.ini instead#36217

Merged
sebastian-philipp merged 1 commit intoceph:masterfrom
sebastian-philipp:cephadm-common-mypy-ini
Jul 29, 2020
Merged

cephadm: use src/mypy.ini instead#36217
sebastian-philipp merged 1 commit intoceph:masterfrom
sebastian-philipp:cephadm-common-mypy-ini

Conversation

@sebastian-philipp
Copy link
Contributor

Signed-off-by: Sebastian Wagner sebastian.wagner@suse.com

Right now, this fails with

cephadm: note: In member "_release" of class "FileLock":
cephadm:735: error: Argument 1 to "flock" has incompatible type "Optional[Any]"; expected "Union[int, HasFileno]"
cephadm:736: error: Argument 1 to "close" has incompatible type "Optional[Any]"; expected "int"
cephadm: note: In function "_infer_fsid":
cephadm:1127: error: Incompatible types in assignment (expression has type "List[str]", variable has type "Set[str]")
cephadm:1133: error: Value of type "Set[str]" is not indexable
cephadm:1134: error: Value of type "Set[str]" is not indexable
cephadm: note: In function "make_data_dir":
cephadm:1277: error: Incompatible default for argument "uid" (default has type "None", argument has type "int")
cephadm:1277: error: Incompatible default for argument "gid" (default has type "None", argument has type "int")
cephadm: note: In function "make_log_dir":
cephadm:1287: error: Incompatible default for argument "uid" (default has type "None", argument has type "int")
cephadm:1287: error: Incompatible default for argument "gid" (default has type "None", argument has type "int")
cephadm: note: In function "copy_tree":
cephadm:1302: error: Incompatible default for argument "uid" (default has type "None", argument has type "int")
cephadm:1302: error: Incompatible default for argument "gid" (default has type "None", argument has type "int")
cephadm: note: In function "copy_files":
cephadm:1327: error: Incompatible default for argument "uid" (default has type "None", argument has type "int")
cephadm:1327: error: Incompatible default for argument "gid" (default has type "None", argument has type "int")
cephadm: note: In function "move_files":
cephadm:1347: error: Incompatible default for argument "uid" (default has type "None", argument has type "int")
cephadm:1347: error: Incompatible default for argument "gid" (default has type "None", argument has type "int")
cephadm: note: In function "get_legacy_config_fsid":
cephadm:1488: error: Incompatible default for argument "legacy_dir" (default has type "None", argument has type "str")
cephadm: note: In function "get_legacy_daemon_fsid":
cephadm:1501: error: Incompatible default for argument "legacy_dir" (default has type "None", argument has type "str")
cephadm: note: In function "list_daemons":
cephadm:3357: error: Argument "legacy_dir" to "get_legacy_daemon_fsid" has incompatible type "Optional[str]"; expected "str"
Found 18 errors in 1 file (checked 1 source file)
ERROR: InvocationError: '/home/sebastian/Repos/ceph/src/cephadm/.tox/mypy/bin/mypy --config-file ../mypy.ini cephadm'

but I know that existing open PRs will fix a few issues.

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

Copy link
Contributor

@mgfritch mgfritch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but I know that existing open PRs will fix a few issues.

fix is good, but will break make check on future PRs until we get these resolved.

which PR(s) address these? should they be addressed in this PR?

@sebastian-philipp
Copy link
Contributor Author

but I know that existing open PRs will fix a few issues.

fix is good, but will break make check on future PRs until we get these resolved.

we can't merge this PR, till those issues are resolved.

which PR(s) address these? should they be addressed in this PR?

I guess this PR :-)

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
@sebastian-philipp
Copy link
Contributor Author

@sebastian-philipp
Copy link
Contributor Author

@jschmid1 jschmid1 self-requested a review July 29, 2020 08:18
@sebastian-philipp sebastian-philipp merged commit d97e97b into ceph:master Jul 29, 2020
Copy link
Member

@jmolmo jmolmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems familiar to me.... :-) . LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants