Skip to content

Reference

CLI

The package installs one command, astrolabe, with one subcommand.

Terminal window
astrolabe init [--path DIR] [--allow-unproven LEVEL] [--dry-run]

The command sets up pyproject.toml for the plugin:

  • It adds astrolabe.plugin to plugins in [tool.mypy], and sets allow_redefinition = true.
  • It writes a [tool.astrolabe] table with every setting at its default, each with a comment.

The command keeps the comments and the format of the file. A second run changes nothing, and says that the project is already set up.

OptionEffect
--path DIRThe directory of the project. The default is the current directory.
--allow-unproven LEVELThe level to write for allow_unproven: never, none, stated, omitted, possible or asserted. The default is omitted.
--dry-runShow the changes, and write nothing.

If mypy reads its configuration from mypy.ini, .mypy.ini or the [mypy] section of setup.cfg, the command changes nothing. It shows the lines to add to that file.