eclipse / paho.mqtt.python

paho.mqtt.python
Other
2.19k stars 722 forks source link

Add pre-commit plus a GItHub Action to run it #776

Closed cclauss closed 9 months ago

cclauss commented 9 months ago

As discussed at https://github.com/eclipse/paho.mqtt.python/pull/718#discussion_r1432593177

@akx Your review, please.

Using https://pre-commit.ci is even better than using GitHub Actions for pre-commit.

% pre-commit run --all-files

[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/charliermarsh/ruff-pre-commit.
[INFO] Initializing environment for https://github.com/abravalheri/validate-pyproject.
[INFO] Initializing environment for https://github.com/abravalheri/validate-pyproject:.[all].
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/charliermarsh/ruff-pre-commit.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/abravalheri/validate-pyproject.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
check builtin type constructor use.......................................Passed
check toml...............................................................Passed
check xml............................................(no files to check)Skipped
check yaml...............................................................Passed
ruff.....................................................................Passed
Validate pyproject.toml..................................................Passed
PierreF commented 9 months ago

The error isn't added by the PR but already present on master. I will fix it once merged.