Project Context Overview
Below is the entry point for our Flask-based Task Manager. Cursor AI reads this file to understand imports, configuration, and helper functions:1. Installing PyTest and Updating Dependencies
To add testing support to your project:Install PyTest and update requirements.txt…and it will execute the above two commands for you.
Pin your test dependencies to avoid version conflicts. For example, add
pytest>=8.0,<9.0 in your requirements.txt.2. Generating a Test Suite
Cursor AI can scaffold test files based on your code structure. For example:3. Running Tests and Interpreting Failures
To run your tests:4. Profiling Data Processing
To profile yourapp.py or any CPU-bound function:
5. Handling Port Conflicts
When you start the Flask server and port 5000 is occupied, you’ll see an error:If you encounter a port conflict, restart the server on a different port:
Best Practices for Context-Aware Commands
Example Prompt Context
Inline Terminal Questions
You can ask quick questions directly in the terminal:
A .pylintrc file is the configuration for pylint, a static code analysis tool for Python.