feat(python): Add scan_for_pyfiles option (#692)

Also adds two new entries to the list of hardcoded files to check:
setup.py and __init__.py.
This commit is contained in:
Alex Jurkiewicz
2020-04-14 18:26:51 +10:00
committed by GitHub
parent beed0acc6c
commit 965338df95
4 changed files with 96 additions and 11 deletions
+4 -1
View File
@@ -1106,9 +1106,11 @@ The module will be shown if any of the following conditions are met:
- The current directory contains a `.python-version` file
- The current directory contains a `requirements.txt` file
- The current directory contains a `pyproject.toml` file
- The current directory contains a file with the `.py` extension
- The current directory contains a file with the `.py` extension (and `scan_for_pyfiles` is true)
- The current directory contains a `Pipfile` file
- The current directory contains a `tox.ini` file
- The current directory contains a `setup.py` file
- The current directory contains a `__init__.py` file
- A virtual environment is currently activated
### Options
@@ -1118,6 +1120,7 @@ The module will be shown if any of the following conditions are met:
| `symbol` | `"🐍 "` | The symbol used before displaying the version of Python. |
| `pyenv_version_name` | `false` | Use pyenv to get Python version |
| `pyenv_prefix` | `"pyenv "` | Prefix before pyenv version display (default display is `pyenv MY_VERSION`) |
| `scan_for_pyfiles` | `true` | If false, Python files in the current directory will not show this module. |
| `style` | `"bold yellow"` | The style for the module. |
| `disabled` | `false` | Disables the `python` module. |