make lint + improve makefile
This commit is contained in:
@@ -85,7 +85,7 @@ NPM ?= pnpm
|
|||||||
frontend-test-playlist-detail \
|
frontend-test-playlist-detail \
|
||||||
frontend-test-queuehelpers \
|
frontend-test-queuehelpers \
|
||||||
rebuild \
|
rebuild \
|
||||||
test tests check lint format ci
|
fmt format lint tests test ci
|
||||||
|
|
||||||
help: ## Show available targets
|
help: ## Show available targets
|
||||||
@grep -E '^[a-zA-Z0-9_.-]+:.*## ' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*## "}; {printf "%-34s %s\n", $$1, $$2}'
|
@grep -E '^[a-zA-Z0-9_.-]+:.*## ' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*## "}; {printf "%-34s %s\n", $$1, $$2}'
|
||||||
@@ -338,16 +338,15 @@ frontend-test-discover-page: ## Run discover page and query tests
|
|||||||
rebuild: ## Rebuild the application
|
rebuild: ## Rebuild the application
|
||||||
cd "$(ROOT_DIR)" && ./manage.sh --rebuild
|
cd "$(ROOT_DIR)" && ./manage.sh --rebuild
|
||||||
|
|
||||||
test: backend-test frontend-test ## Run backend and frontend tests
|
fmt: format ## Alias for 'format'
|
||||||
|
|
||||||
tests: test ## Alias for 'test'
|
|
||||||
|
|
||||||
check: backend-test frontend-check ## Run backend tests and frontend type checks
|
|
||||||
|
|
||||||
lint: backend-lint frontend-lint ## Run linting targets
|
|
||||||
|
|
||||||
format: ## Auto-format backend (ruff --fix) and frontend (prettier)
|
format: ## Auto-format backend (ruff --fix) and frontend (prettier)
|
||||||
cd "$(ROOT_DIR)" && $(BACKEND_VENV_DIR)/bin/ruff check --fix backend
|
cd "$(ROOT_DIR)" && $(BACKEND_VENV_DIR)/bin/ruff check --fix backend
|
||||||
cd "$(FRONTEND_DIR)" && $(NPM) run format
|
cd "$(FRONTEND_DIR)" && $(NPM) run format
|
||||||
|
|
||||||
ci: backend-test backend-lint frontend-check frontend-lint frontend-format-check frontend-test-server ## Run the local CI checks
|
lint: backend-lint frontend-lint ## Run all linting checks
|
||||||
|
|
||||||
|
tests: backend-test frontend-test-server ## Run all tests
|
||||||
|
test: tests ## Alias for 'tests'
|
||||||
|
|
||||||
|
ci: backend-lint frontend-lint frontend-check frontend-format-check backend-test frontend-test-server ## Run the full CI pipeline (fmt-check + lint + typecheck + tests)
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ class TestGetOrCreateSettingNoDeadlock:
|
|||||||
prefs = PreferencesService(settings)
|
prefs = PreferencesService(settings)
|
||||||
result = prefs.get_or_create_setting("plex_client_id", lambda: "test-client-id")
|
result = prefs.get_or_create_setting("plex_client_id", lambda: "test-client-id")
|
||||||
result = (result, prefs.get_or_create_setting("plex_client_id", lambda: "other"))
|
result = (result, prefs.get_or_create_setting("plex_client_id", lambda: "other"))
|
||||||
except Exception as e:
|
except (OSError, ValueError, RuntimeError) as e:
|
||||||
exc = e
|
exc = e
|
||||||
|
|
||||||
t = threading.Thread(target=run)
|
t = threading.Thread(target=run)
|
||||||
|
|||||||
Reference in New Issue
Block a user