vscode configuartion added and pep8 for python file

This commit is contained in:
Dirk Alders 2025-07-23 18:12:17 +02:00
parent 7008ec077b
commit 1db7cb2451
3 changed files with 7 additions and 8 deletions

6
.vscode/launch.json vendored
View File

@ -9,9 +9,9 @@
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/mqtt_sniffer.py",
"console": "externalTerminal",
"args": ["-n", "-u", "smarthome", "-t", "es.*t", "-l"],
"console": "integratedTerminal",
"args": ["-f", "mqtt.home", "-p", "1884", "-n"],
"justMyCode": true
}
]
}
}

View File

@ -1,15 +1,14 @@
{
"python.defaultInterpreterPath": "./venv/bin/python",
"autopep8.args": ["--max-line-length=150"],
"python.formatting.provider": "none",
"[python]": {
"editor.defaultFormatter": "ms-python.python",
"python.formatting.provider": "none",
"editor.defaultFormatter": "ms-python.autopep8",
"editor.formatOnSave": true
},
"editor.formatOnSave": true,
"editor.fontSize": 14,
"emmet.includeLanguages": { "django-html": "html" },
"python.testing.pytestArgs": ["-v", "--cov", "--cov-report=xml", "__test__"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.pytestEnabled": true
}

View File

@ -40,6 +40,7 @@ class MqttHandler(object):
logger.debug("Sending message: topic=%s, payload=%s type=%s", topic, repr(payload), repr(type(payload)))
self.mqtt_client.send(topic, payload)
class MqttSniffer(App):
"""a textual application for viewing mqtt messages."""
@ -109,7 +110,6 @@ class MqttSniffer(App):
self.all_logs = []
self._update_display()
def _update_display(self):
"""Clean the display and render all mqtt messages based on the current filters."""
self.log_display.clear()