Remove secrets and auto-start actions and update imports
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user