diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2021-11-20 23:04:11 -0800 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2021-11-20 23:04:11 -0800 |
commit | f2b1dbd9de5357dca6f860a12ba4d10bd23a2ade (patch) | |
tree | 75dcb6def49080f020548f2317971e91d1bbb451 /scripts | |
parent | 63c7fa4913765a38ec6d65c556bc92c24549e891 (diff) | |
download | isort-f2b1dbd9de5357dca6f860a12ba4d10bd23a2ade.tar.gz |
Populate more config option descriptions
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_config_option_docs.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/build_config_option_docs.py b/scripts/build_config_option_docs.py index 5b050f0b..259d1eda 100755 --- a/scripts/build_config_option_docs.py +++ b/scripts/build_config_option_docs.py @@ -24,6 +24,7 @@ how you want your imports sorted, organized, and formatted. Too busy to build your perfect isort configuration? For curated common configurations, see isort's [built-in profiles](https://pycqa.github.io/isort/docs/configuration/profiles.html). """ +SKIP_OPTIONS = "sources" parser = _build_arg_parser() @@ -118,9 +119,11 @@ description_mapping = { "classes": "An override list of tokens to always recognize as a Class for order_by_type regardless of casing.", "variables": "An override list of tokens to always recognize as a var for order_by_type regardless of casing.", "auto_identify_namespace_packages": "Automatically determine local namespace packages, generally by lack of any src files before a src containing directory.", - "namespaces_packages": "Manually specify one or more namespace packages.", + "namespace_packages": "Manually specify one or more namespace packages.", "follow_links": "If `True` isort will follow symbolic links when doing recursive sorting.", "git_ignore": "If `True` isort will honor ignores within locally defined .git_ignore files.", + "formatting_function": "The fully qualified Python path of a function to apply to format code sorted by isort.", + "group_by_package": "If `True` isort will automatically create section groups by the top-level package they come from.", } example_mapping: Dict[str, Example] @@ -331,6 +334,9 @@ def human(name: str) -> str: def config_options() -> Generator[ConfigOption, None, None]: cli_actions = {action.dest: action for action in parser._actions} for name, default in config.items(): + if name in SKIP_OPTIONS: + continue + extra_kwargs = {} description: Optional[str] = description_mapping.get(name, None) @@ -358,6 +364,9 @@ def config_options() -> Generator[ConfigOption, None, None]: ) for name, cli in cli_actions.items(): + if name in SKIP_OPTIONS: + continue + extra_kwargs = {} description: Optional[str] = description_mapping.get(name, None) if cli.type: |