mirror of https://github.com/nicolargo/glances.git
Lint the code
This commit is contained in:
parent
5886321156
commit
5d9593b393
|
|
@ -11,10 +11,7 @@ repos:
|
||||||
- id: ruff-check
|
- id: ruff-check
|
||||||
name: "🐍 python · Linter with Ruff"
|
name: "🐍 python · Linter with Ruff"
|
||||||
types_or: [ python, pyi ]
|
types_or: [ python, pyi ]
|
||||||
args: [ --fix, --exit-non-zero-on-fix ]
|
args: [ --fix, --exit-non-zero-on-fix, --config, './pyproject.toml' ]
|
||||||
- id: ruff-format
|
|
||||||
name: "🐍 python · Format with Ruff"
|
|
||||||
types_or: [ python, pyi ]
|
|
||||||
|
|
||||||
# - repo: https://github.com/RobertCraigie/pyright-python
|
# - repo: https://github.com/RobertCraigie/pyright-python
|
||||||
# rev: v1.1.391
|
# rev: v1.1.391
|
||||||
|
|
@ -48,11 +45,11 @@ repos:
|
||||||
name: "🐚 shell · Check shell script code style"
|
name: "🐚 shell · Check shell script code style"
|
||||||
entry: bashate --error . --ignore=E006
|
entry: bashate --error . --ignore=E006
|
||||||
|
|
||||||
- repo: https://github.com/mrtazz/checkmake.git
|
# - repo: https://github.com/mrtazz/checkmake.git
|
||||||
rev: 0.2.2
|
# rev: 0.2.2
|
||||||
hooks:
|
# hooks:
|
||||||
- id: checkmake
|
# - id: checkmake
|
||||||
name: "🐮 Makefile · Lint Makefile"
|
# name: "🐮 Makefile · Lint Makefile"
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v6.0.0
|
rev: v6.0.0
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -20,7 +20,7 @@ UV_RUN := .venv-uv/bin/uv
|
||||||
# if the command is only `make`, the default tasks will be the printing of the help.
|
# if the command is only `make`, the default tasks will be the printing of the help.
|
||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
.PHONY: help test docs docs-server venv requirements profiling docker all clean
|
.PHONY: help test docs docs-server venv requirements profiling docker all clean all test
|
||||||
|
|
||||||
help: ## List all make commands available
|
help: ## List all make commands available
|
||||||
@grep -E '^[\.a-zA-Z_%-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
|
@grep -E '^[\.a-zA-Z_%-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
|
||||||
|
|
|
||||||
|
|
@ -482,7 +482,7 @@ class ProcesslistPlugin(GlancesPluginModel):
|
||||||
ret.append(self.curse_add_line(msg, decoration=process_decoration, splittable=True))
|
ret.append(self.curse_add_line(msg, decoration=process_decoration, splittable=True))
|
||||||
if arguments:
|
if arguments:
|
||||||
msg = ' ' if args.cursor_process_name_position == 0 else unicode_message('THREE_DOTS')
|
msg = ' ' if args.cursor_process_name_position == 0 else unicode_message('THREE_DOTS')
|
||||||
msg += self.layout_stat['command'].format(arguments[args.cursor_process_name_position:])
|
msg += self.layout_stat['command'].format(arguments[args.cursor_process_name_position :])
|
||||||
ret.append(self.curse_add_line(msg, splittable=True))
|
ret.append(self.curse_add_line(msg, splittable=True))
|
||||||
else:
|
else:
|
||||||
msg = self.layout_stat['name'].format(bare_process_name)
|
msg = self.layout_stat['name'].format(bare_process_name)
|
||||||
|
|
@ -967,4 +967,5 @@ class ProcesslistPlugin(GlancesPluginModel):
|
||||||
# By default return 5 (corresponding to 99999 PID number)
|
# By default return 5 (corresponding to 99999 PID number)
|
||||||
return 5
|
return 5
|
||||||
|
|
||||||
|
|
||||||
# End of file
|
# End of file
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue