Remove secrets and auto-start actions and update imports
Some checks failed
Ansible Lint Check / check-ansible (push) Successful in 4s
Nix Format Check / check-format (push) Successful in 1m14s
Python Lint Check / check-python (push) Failing after 6s

This commit is contained in:
2025-09-23 13:59:48 +00:00
parent 40063cfe6b
commit 8971d087a3
14 changed files with 58 additions and 326 deletions

View File

@@ -1,5 +1,7 @@
#!/usr/bin/env python3
"""Run linters on dotfiles."""
import os
import sys
import subprocess
@@ -7,7 +9,7 @@ import argparse
from pathlib import Path
# Import helper functions
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(__file__))))
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from helpers.functions import printfe, command_exists
DOTFILES_ROOT = os.path.expanduser("~/.dotfiles")
@@ -85,16 +87,6 @@ def lint_python(fix=False):
exit_code = 0
# Check for pylint
if command_exists("pylint"):
printfe("blue", "Running pylint...")
files_to_lint = [str(f) for f in python_files]
result = subprocess.run(["pylint"] + files_to_lint, check=False)
if result.returncode != 0:
exit_code = 1
else:
printfe("yellow", "pylint is not installed. Skipping Python linting.")
# Check for black
if command_exists("black"):
printfe(
@@ -111,6 +103,16 @@ def lint_python(fix=False):
else:
printfe("yellow", "black is not installed. Skipping Python formatting.")
# Check for pylint
if command_exists("pylint"):
printfe("blue", "Running pylint...")
files_to_lint = [str(f) for f in python_files]
result = subprocess.run(["pylint"] + files_to_lint, check=False)
if result.returncode != 0:
exit_code = 1
else:
printfe("yellow", "pylint is not installed. Skipping Python linting.")
if not command_exists("pylint") and not command_exists("black"):
printfe(
"red",