Undocumented
Class | ConfigTOMLValueError |
Undocumented |
Function | check_follow_imports |
Undocumented |
Function | convert_to_boolean |
Return a boolean value translating from other types if necessary. |
Function | destructure_overrides |
Take the new [[tool.mypy.overrides]] section array in the pyproject.toml file, and convert it back to a flatter structure that the existing config_parser can handle. |
Function | expand_path |
Expand the user home directory and any environment variables contained within the provided path. |
Function | get_config_module_names |
Undocumented |
Function | get_prefix |
Undocumented |
Function | is_toml |
Undocumented |
Function | mypy_comments_to_config_map |
Rewrite the mypy comment syntax into ini file syntax. |
Function | parse_config_file |
Parse a config file into an Options object. |
Function | parse_mypy_comments |
Parse a collection of inline mypy: configuration comments. |
Function | parse_section |
Parse one section of a config file. |
Function | parse_version |
Undocumented |
Function | split_and_match_files |
Take a string representing a list of files/directories (with support for globbing through the glob library). |
Function | split_and_match_files_list |
Take a list of files/directories (with support for globbing through the glob library). |
Function | split_directive |
Split s on commas, except during quoted sections. |
Function | try_split |
Split and trim a str or list of str into a list of str |
Constant | ini_config_types |
Undocumented |
Constant | toml_config_types |
Undocumented |
Constant | _CONFIG_VALUE_TYPES |
Undocumented |
Constant | _INI_PARSER_CALLABLE |
Undocumented |
Parameters | |
value:Optional[ | Undocumented |
Returns | |
bool | Undocumented |
Take the new [[tool.mypy.overrides]] section array in the pyproject.toml file, and convert it back to a flatter structure that the existing config_parser can handle.
E.g. the following pyproject.toml file:
[[tool.mypy.overrides]] module = [
"a.b", "b.*"] disallow_untyped_defs = true
[[tool.mypy.overrides]] module = 'c' disallow_untyped_defs = false
Would map to the following config dict that it would have gotten from parsing an equivalent ini file:
- {
- "mypy-a.b": {
- disallow_untyped_defs = true,
}, "mypy-b.*": {
disallow_untyped_defs = true,}, "mypy-c": {
disallow_untyped_defs: false,},
}
Parameters | |
toml_data:Dict[ | Undocumented |
Returns | |
Dict[ | Undocumented |
Parameters | |
path:str | Undocumented |
Returns | |
str | Undocumented |
Undocumented
Parameters | |
filename:Optional[ | Undocumented |
modules:List[ | Undocumented |
Returns | |
str | Undocumented |
Rewrite the mypy comment syntax into ini file syntax.
Returns
Parameters | |
line:str | Undocumented |
template:Options | Undocumented |
Returns | |
Tuple[ | Undocumented |
Parse a config file into an Options object.
Errors are written to stderr but are not fatal.
If filename is None, fall back to default config files.
Parameters | |
options:Options | Undocumented |
set_strict_flags:Callable[ | Undocumented |
filename:Optional[ | Undocumented |
stdout:Optional[ | Undocumented |
stderr:Optional[ | Undocumented |
Parse a collection of inline mypy: configuration comments.
Returns a dictionary of options to be applied and a list of error messages generated.
Parameters | |
args:List[ | Undocumented |
template:Options | Undocumented |
Returns | |
Tuple[ | Undocumented |
Parse one section of a config file.
Returns a dict of option values encountered, and a dict of report directories.
Parameters | |
prefix:str | Undocumented |
template:Options | Undocumented |
set_strict_flags:Callable[ | Undocumented |
section:Mapping[ | Undocumented |
config_types:Dict[ | Undocumented |
stderr:TextIO | Undocumented |
Returns | |
Tuple[ | Undocumented |
Take a string representing a list of files/directories (with support for globbing through the glob library).
Where a path/glob matches no file, we still include the raw path in the resulting list.
Returns a list of file paths
Parameters | |
paths:str | Undocumented |
Returns | |
List[ | Undocumented |
Take a list of files/directories (with support for globbing through the glob library).
Where a path/glob matches no file, we still include the raw path in the resulting list.
Returns a list of file paths
Parameters | |
paths:Sequence[ | Undocumented |
Returns | |
List[ | Undocumented |
Split s on commas, except during quoted sections.
Returns the parts and a list of error messages.
Parameters | |
s:str | Undocumented |
Returns | |
Tuple[ | Undocumented |
Parameters | |
v:Union[ | Undocumented |
split_regex:str | Undocumented |
Returns | |
List[ | Undocumented |
Undocumented
Value |
|