|
16 | 16 | **REQUIRED CONDITIONS:** |
17 | 17 | - To use Azure MCP tool calls, users must have PowerShell installed. Provide [PowerShell installation instructions](https://learn.microsoft.com/powershell/scripting/install/installing-powershell) if not installed, and recommend restarting the IDE to start the MCP server. |
18 | 18 |
|
| 19 | +### RULE 4: USE VIRTUAL ENVIRONMENTS |
| 20 | +**ALWAYS run Python commands in a virtual environment (venv).** |
| 21 | +- All Python operations (pip, tox, pytest, etc.) must be executed within an activated virtual environment |
| 22 | +- Create a virtual environment using: `python -m venv env` |
| 23 | +- Activate before running commands: |
| 24 | + - Windows (PowerShell): `env\scripts\activate` |
| 25 | + - Linux/Mac: `source env/bin/activate` |
| 26 | + - Windows (CMD): `env\scripts\activate.bat` |
| 27 | +- Reference: [Python virtual environment documentation](https://docs.python.org/3/tutorial/venv.html) |
| 28 | +- Reference: [Azure SDK dev setup guide](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/dev_setup.md) |
| 29 | + |
19 | 30 | --- |
20 | 31 |
|
21 | 32 | ## PYLINT OPERATIONS |
|
26 | 37 | - [Official pylint guide](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/pylint_checking.md) |
27 | 38 | - [Tox formatting guide](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/tests.md#tox) |
28 | 39 |
|
| 40 | +**PREREQUISITES:** |
| 41 | +- Ensure you are in an activated virtual environment before running pylint commands |
| 42 | + |
29 | 43 | **COMMAND:** |
30 | 44 | ```bash |
| 45 | +# After activating your virtual environment |
31 | 46 | tox -e pylint --c <path_to_tox.ini> --root . |
32 | 47 | ``` |
33 | 48 |
|
@@ -64,6 +79,7 @@ tox -e pylint --c <path_to_tox.ini> --root . |
64 | 79 | - [MyPy fixing guide](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/static_type_checking_cheat_sheet.md) |
65 | 80 |
|
66 | 81 | **REQUIREMENTS:** |
| 82 | +- Ensure you are in an activated virtual environment before running MyPy commands |
67 | 83 | - Use Python 3.9 compatible environment |
68 | 84 | - Follow official fixing guidelines |
69 | 85 | - Use tox mcp tool for running MyPy |
|
0 commit comments