Command line interface¶
slotscheck¶
Check whether your __slots__ are working properly.
slotscheck [OPTIONS] [FILES]...
Options
- -m, --module <module>¶
Check this module. Cannot be combined with FILES argument. Can be repeated multiple times to scan several modules.
- --require-superclass, --no-require-superclass¶
Report an error when a slots class inherits from a non-slotted class.
- Default:
required
- --require-subclass, --no-require-subclass¶
Report an error when a non-slotted class inherits from a slotted class. In effect, this option enforces the use of slots wherever possible.
- Default:
not required
- --include-modules <include_modules>¶
A regular expression that matches modules to include. Exclusions are determined first, then inclusions. Uses Python’s verbose regex dialect, so whitespace is mostly ignored.
- --exclude-modules <exclude_modules>¶
A regular expression that matches modules to exclude. Excluded modules will not be imported. Uses Python’s verbose regex dialect, so whitespace is mostly ignored.
- Default:
``(^|\.)__main__(\.|$)``
- --include-classes <include_classes>¶
A regular expression that matches classes to include. Use
:
to separate module and class paths. For example:app\.config:.*Settings
,:(Foo|Bar)
. Exclusions are determined first, then inclusions. Uses Python’s verbose regex dialect, so whitespace is mostly ignored.
- --exclude-classes <exclude_classes>¶
A regular expression that matches classes to exclude. Use
:
to separate module and class paths. For example:app\.config:Settings
,:.*(Exception|Error)
. Uses Python’s verbose regex dialect, so whitespace is mostly ignored.- Default:
``^$``
- --strict-imports, --no-strict-imports¶
Treat failed imports as errors.
- Default:
strict
- -v, --verbose¶
Display extra descriptive output.
- --settings <settings>¶
Path to the configuration file to use. Allowed extensions are toml, cfg, ini.
- --version¶
Show the version and exit.
Arguments
- FILES¶
Optional argument(s)