Skip to content

VS Code Settings⚓︎

Here are our recommended VS Code settings for Python development. These settings are optimized for our development workflow and integrate well with the tools we use.

Python Development Settings⚓︎

{
    "[python]": {
        "editor.defaultFormatter": "charliermarsh.ruff",
        "editor.formatOnSave": true,
        "editor.codeActionsOnSave": {
            "source.organizeImports": "explicit"
        }
    }
}

These settings: - Use Ruff as the default formatter for Python files - Enable format on save - Configure import organization to run explicitly

Testing Configuration⚓︎

{
    "python.testing.pytestArgs": [
        "tests"
    ],
    "python.testing.unittestEnabled": false,
    "python.testing.pytestEnabled": true
}

This configuration: - Sets up pytest as the default test runner - Configures the tests directory - Disables unittest in favor of pytest

Code Quality Tools⚓︎

{
    "sonarlint.connectedMode.project": {
        "connectionId": "sea-ai",
        "projectKey": "SEA-AI_seavision"
    },
    "pylint.ignorePatterns": [
        "*test*.py"
    ]
}

These settings: - Configure SonarLint for code quality analysis - Set up Pylint to ignore test files

File Management⚓︎

{
    "files.exclude": {
        "**/.mypy_cache": true,
        "**/.pytest_cache": true,
        "**/.ruff_cache": true
    }
}

This helps keep your workspace clean by hiding: - Type checking cache files - Test cache directories - Linter cache files

Additional Features⚓︎

{
    "emojisense.languages": {
        "python": true
    }
}

Enables emoji support in Python files.

  1. Python (Microsoft)
  2. Python language support
  3. IntelliSense
  4. Linting
  5. Debugging

  6. Ruff (Astral)

  7. Fast Python linter
  8. Code formatting
  9. Import organization

  10. Pylance (Microsoft)

  11. Fast, feature-rich language support
  12. Type checking
  13. Auto-completion

  14. SonarLint (SonarSource)

  15. Code quality and security
  16. Real-time feedback
  17. Best practices enforcement

  18. GitLens (GitKraken)

  19. Enhanced Git capabilities
  20. Blame annotations
  21. History visualization

  22. Markdown All in One (Yu Zhang)

  23. Markdown support
  24. Preview
  25. Auto-completion

Best Practices⚓︎

  1. Workspace Settings
  2. Use workspace settings for project-specific configurations
  3. Share settings with team members
  4. Document any custom settings

  5. Extension Management

  6. Keep extensions up to date
  7. Remove unused extensions
  8. Use recommended extensions list

  9. Keyboard Shortcuts

  10. Learn common shortcuts
  11. Customize for your workflow
  12. Use command palette (Cmd/Ctrl + Shift + P)

  13. Integrated Terminal

  14. Use the integrated terminal
  15. Configure your preferred shell
  16. Use multiple terminals when needed

Troubleshooting⚓︎

Common issues and solutions:

  1. Formatting Not Working
  2. Check if Ruff is installed
  3. Verify extension is enabled
  4. Check file associations

  5. Linting Issues

  6. Clear cache files
  7. Restart VS Code
  8. Check extension settings

  9. Performance Problems

  10. Disable unnecessary extensions
  11. Clear workspace storage
  12. Check file watchers