If I have Python-related files in my workspace, automatically activate the extension
See original GitHub issueGoal - Lets not wait for the user to open a python file to activate the extension
If the user has some of the following files we could probably activate the extension without having to wait for the user to open a python file:
- pip env files
- poetry files
- setup.py
- setup.cfg?
- tox.ini
- pyproject.toml
- pytest.ini
- requirements.txt
- test_requirements.txt
- .pylintrc
- .flake8
__init__.py
- manage.py
src/__init__.py
tests/__init__.py
- meta.yml
- environment.yml
- anaconda-project.yml
- .pep8
- .pycodestyle
Issue Analytics
- State:
- Created 5 years ago
- Reactions:21
- Comments:46 (19 by maintainers)
Top Results From Across the Web
How to start python extension automatically in a workspace?
py file, run a python - * command in the Ctrl+Shift+P command pallete, etc). This means that if I open up a terminal...
Read more >how to configure my project to automatically activate Python ...
To activate Python extension in VSCode I must open a Python file. Can I activate it without opening a Python file?
Read more >Settings Reference for Python - Visual Studio Code
Settings Reference for the Python extension in Visual Studio Code. ... By default, it only shows when there are Python related files open...
Read more >How to “Dockerize” Your Python Applications
If you're seeking a blueprint for deploying Python apps within Docker containers, look no further!
Read more >Manage workspaces in portal or Python SDK (v2) - Azure ...
If you don't have an Azure subscription, create a free account before you ... automatically create services needed by the workspace or use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks to @soneji for the PR and everyone else in constructively participating in the discussion! This will be out in our March release.
One thing to be aware of is we used to get complaints about being overly liberal with launching the extension by folks who happen to have Python scripts in their e.g. C++ code base who do nothing more than generate test data by running Python, and so they only edit Python code every couple of months and not every time they open a workspace.
Without discussing it with the team 😉 , my guess is we can probably consider files that very clearly delineate that a project is primarily Python-based (e.g.
pyproject.toml
), but we can’t do it for just any file that someone using Python for any reason may have (e.g. configuration files for linters which you might have set up for that one Python file you have).So I think that would suggest we could consider:
Pipfile
setup.py
requirements.txt
manage.py
for Djangoenvironment.yml
for Anaconda (maybe; that file is not exclusive to Python, e.g. R projects use the same file for Anaconda so this might not work out)We don’t need
setup.cfg
as that’s covered bysetup.py
andpyproject.toml
(otherwise that file is useless).pyproject.toml
also takes care of Poetry. And everything else doesn’t necessarily suggest the code base is oriented towards Python (e.g.SConstruct
has the issue of being used by projects that are not necessarily Python-focused, and using Pylint just means you have some Python code).