devcontainer.json 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. {
  2. "name": "Tuya Local Dev",
  3. "image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
  4. "postCreateCommand": "pip3 install --user -r requirements.txt",
  5. "containerEnv": {
  6. "DEVCONTAINER": "1"
  7. },
  8. "appPort": [
  9. "8123:8123"
  10. ],
  11. "forwardPorts": [
  12. 8123
  13. ],
  14. "portsAttributes": {
  15. "8123": {
  16. "label": "Home Assistant"
  17. },
  18. "0-8122": {
  19. "label": "Auto-Forwarded - Other",
  20. "onAutoForward": "ignore"
  21. },
  22. "8124-999999": {
  23. "label": "Auto-Forwarded - Other",
  24. "onAutoForward": "ignore"
  25. }
  26. },
  27. "customizations": {
  28. "vscode": {
  29. "extensions": [
  30. "ms-python.vscode-pylance",
  31. "visualstudioexptteam.vscodeintellicode",
  32. "redhat.vscode-yaml",
  33. "esbenp.prettier-vscode",
  34. "GitHub.vscode-pull-request-github",
  35. "ms-python.pylint",
  36. "ms-python.black-formatter",
  37. "ms-python.isort",
  38. "ms-python.python",
  39. "ryanluker.vscode-coverage-gutters"
  40. ],
  41. "settings": {
  42. "python.linting.enabled": true,
  43. "python.linting.pylintEnabled": true,
  44. "python.formatting.provider": "black",
  45. "python.testing.pytestArgs": [
  46. "--no-cov"
  47. ],
  48. "editor.formatOnPaste": false,
  49. "editor.formatOnSave": true,
  50. "editor.formatOnType": true,
  51. "files.eol": "\n",
  52. "editor.tabSize": 4,
  53. "files.trimTrailingWhitespace": true,
  54. "terminal.integrated.profiles.linux": {
  55. "zsh": {
  56. "path": "/usr/bin/zsh"
  57. }
  58. },
  59. "terminal.integrated.defaultProfile.linux": "zsh",
  60. "yaml.customTags": [
  61. "!input scalar",
  62. "!secret scalar",
  63. "!include_dir_named scalar",
  64. "!include_dir_list scalar",
  65. "!include_dir_merge_list scalar",
  66. "!include_dir_merge_named scalar"
  67. ]
  68. }
  69. }
  70. },
  71. "remoteUser": "vscode",
  72. "features": {
  73. "rust": "latest"
  74. }
  75. }