### Configure Python Projects Source: https://context7.com/ak110/pyfltr/llms.txt Comprehensive configuration example for Python projects integrating ruff, mypy, and pytest. ```toml [tool.pyfltr] preset = "latest" pylint-args = ["--jobs=4"] [tool.ruff] line-length = 128 [tool.ruff.lint] select = ["D", "E", "F", "UP", "B", "SIM", "ICN", "I"] ignore = ["D107", "D415"] [tool.ruff.lint.pydocstyle] convention = "google" [tool.ruff.lint.per-file-ignores] "**_test.py" = ["D"] "**/__init__.py" = ["D104"] [tool.mypy] allow_redefinition = true check_untyped_defs = true ignore_missing_imports = true strict_optional = true show_error_codes = true [tool.pytest.ini_options] addopts = "--showlocals -p no:cacheprovider --maxfail=5" log_level = "DEBUG" ``` -------------------------------- ### Pyfltr JSONL Output Schema Examples Source: https://context7.com/ak110/pyfltr/llms.txt Examples of the JSONL output structure, including records for warnings, diagnostics, tool status, and summaries. Useful for parsing by LLM agents. ```json {"kind":"warning","source":"config","msg":"pre-commit が有効化されていますが、設定ファイルが見つかりません: .pre-commit-config.yaml"} {"kind":"diagnostic","tool":"mypy","file":"src/a.py","line":42,"col":5,"rule":"return-value","severity":"error","msg":"Incompatible return value type"} {"kind":"diagnostic","tool":"ruff-check","file":"src/b.py","line":10,"col":1,"rule":"F401","severity":"error","fix":"safe","msg":"'os' imported but unused"} {"kind":"tool","tool":"mypy","type":"linter","status":"failed","files":12,"elapsed":0.8,"diagnostics":1,"rc":1} {"kind":"tool","tool":"ruff-check","type":"linter","status":"failed","files":12,"elapsed":0.3,"diagnostics":1,"rc":1} {"kind":"tool","tool":"black","type":"formatter","status":"formatted","files":12,"elapsed":0.3,"diagnostics":0,"rc":1} {"kind":"summary","total":3,"succeeded":0,"formatted":1,"failed":2,"skipped":0,"diagnostics":2,"exit":1} ``` -------------------------------- ### Configure Non-Python Projects Source: https://context7.com/ak110/pyfltr/llms.txt Example configuration for Rust projects, disabling Python tools and enabling Rust-specific ones. ```toml # Rust project [tool.pyfltr] preset = "latest" python = false # Disable all Python tools cargo-fmt = true cargo-clippy = true cargo-check = true cargo-test = true cargo-deny = true prettier = true extend-exclude = ["target", "node_modules"] ``` -------------------------------- ### LLM Agent Workflow with JSONL Output Source: https://context7.com/ak110/pyfltr/llms.txt Example workflow for integrating Pyfltr's JSONL output with LLM agents. Includes steps for running checks, examining summaries, and drilling down into specific tools or files. ```bash # Step 1: Run full check and examine summary pyfltr run --output-format=jsonl | tail -30 # Check "kind":"summary" line for "failed" count and "diagnostics" count # Step 2: If issues found, run specific tool on specific files pyfltr run --commands=mypy --output-format=jsonl src/problem_file.py | tail -30 # Step 3: Get detailed text output if needed pyfltr run --commands=mypy src/problem_file.py ``` -------------------------------- ### GitHub Actions Workflow for Python Projects with pyfltr Source: https://context7.com/ak110/pyfltr/llms.txt A complete GitHub Actions workflow for Python projects using pyfltr, including setup for Node.js, pnpm, mise, and uv for dependency management and testing. ```yaml name: CI env: PYTHONDEVMODE: "1" UV_FROZEN: "1" jobs: test: runs-on: ubuntu-latest strategy: matrix: python-version: ["3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - name: Install uv uses: astral-sh/setup-uv@v4 with: python-version: ${{ matrix.python-version }} enable-cache: true - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "lts/*" - name: Setup pnpm uses: pnpm/action-setup@v4 with: version: latest - name: Setup mise uses: jdx/mise-action@v2 - name: Install dependencies run: uv sync --all-extras --all-groups - name: Test with pyfltr run: uv run pyfltr ci - name: Prune uv cache run: uv cache prune --ci ``` -------------------------------- ### Makefile Integration for Pyfltr Workflows Source: https://context7.com/ak110/pyfltr/llms.txt Standard Makefile targets for common development tasks using Pyfltr, including setup, formatting, testing, and CI. Utilizes `uv run` for execution. ```makefile export UV_FROZEN := 1 setup: uv sync --all-groups --all-extras uv run pre-commit install format: uv run pyfltr fast test: uv run pyfltr run ci: uv run pyfltr ci .PHONY: setup format test ci ``` -------------------------------- ### Use Presets in Configuration Source: https://context7.com/ak110/pyfltr/llms.txt Select pre-configured tool combinations or pin to a specific date for stability. ```toml [tool.pyfltr] # Use latest preset (most tools enabled) preset = "latest" # Or pin to specific date for stability preset = "20260413" # Override individual tools after preset mypy = false prettier = true ``` -------------------------------- ### Configure Native Binary Tools with pyfltr Source: https://context7.com/ak110/pyfltr/llms.txt Use `bin-runner` to specify mise or direct execution for native tools. Pin tool versions and customize arguments like shfmt indentation. ```toml [tool.pyfltr] # Use mise for version management (default) bin-runner = "mise" # Options: mise (default), direct # Enable native tools shellcheck = true shfmt = true typo = true actionlint = true ec = true # editorconfig-checker # Pin versions (mise mode only) shellcheck-version = "0.10.0" shfmt-version = "3.10.0" # Customize shfmt indentation shfmt-args = ["-i", "2"] ``` -------------------------------- ### Generate Configuration Template Source: https://context7.com/ak110/pyfltr/llms.txt Outputs a default configuration template to stdout or a file. ```bash # Generate config template to stdout pyfltr generate-config # Save to file pyfltr generate-config > pyfltr-config.toml ``` -------------------------------- ### Basic Pyfltr Configuration Source: https://context7.com/ak110/pyfltr/llms.txt Configure Pyfltr settings, including presets, Python execution, JS runner, and enabled tools like ESLint, Prettier, Vitest, OXLint, and TSC. Exclude specific directories from checks. ```toml [tool.pyfltr] preset = "latest" python = false js-runner = "pnpm" # Use pnpm for JS tools eslint = true prettier = true vitest = true oxlint = true tsc = true extend-exclude = [".svelte-kit", "node_modules", "dist"] ``` -------------------------------- ### Configure Textlint and Markdownlint with pyfltr Source: https://context7.com/ak110/pyfltr/llms.txt Enable textlint and markdownlint, specifying packages and arguments for linting and auto-fixing. Textlint packages are used in pnpx/npx mode. ```toml [tool.pyfltr] textlint = true markdownlint = true # Textlint packages for pnpx/npx mode textlint-packages = [ "textlint-rule-preset-ja-technical-writing", "textlint-rule-preset-jtf-style", "textlint-rule-ja-no-abusage", ] # Textlint lint-specific args (not used in fix mode) textlint-lint-args = ["--format", "compact"] # Enable auto-fix in run/fast textlint-fix-args = ["--fix"] markdownlint-fix-args = ["--fix"] ``` -------------------------------- ### Define Custom Linter Command: Yamllint Source: https://context7.com/ak110/pyfltr/llms.txt Configure Yamllint as a custom linter. Use specific arguments for parsable output and define targets for YAML files. Enables fast execution. ```toml [tool.pyfltr.custom-commands.yamllint] type = "linter" path = "yamllint" args = ["--format", "parsable"] targets = ["*.yaml", "*.yml"] error-pattern = '(?P[^:]+):(?P\d+):(?P\d+):\s*\[(?:error|warning)\]\s*(?P.+)' fast = true ``` -------------------------------- ### Define Custom Linter Command: Svelte-Check Source: https://context7.com/ak110/pyfltr/llms.txt Integrate svelte-check as a custom linter. Specify arguments, including a tsconfig path, and target svelte files. Set `pass-filenames` to false to check the entire project. ```toml [tool.pyfltr.custom-commands.svelte-check] type = "linter" path = "svelte-check" args = ["--tsconfig", "./tsconfig.json"] targets = "*.svelte" pass-filenames = false # Check entire project ``` -------------------------------- ### Configure pyfltr in pyproject.toml Source: https://context7.com/ak110/pyfltr/llms.txt Basic configuration settings for pyfltr, including presets, job counts, and tool exclusions. ```toml [tool.pyfltr] # Use latest preset - enables ruff, pyright, markdownlint, textlint, actionlint, typos, uv-sort, pre-commit preset = "latest" # Override specific tool settings pylint-args = ["--jobs=4"] mypy-fast = true # Include mypy in fast subcommand # Add exclusion patterns extend-exclude = ["migrations", "generated"] # Set parallel job count jobs = 8 # Disable specific tools pflake8 = false ``` -------------------------------- ### Run Lightweight Checks via CLI Source: https://context7.com/ak110/pyfltr/llms.txt Executes only fast tools, excluding heavy processes like mypy or pytest. ```bash # Run fast checks (formatters + quick linters) pyfltr fast # Run fast checks on specific files pyfltr fast src/ docs/ ``` -------------------------------- ### Pyfltr Pre-commit Hook Configuration (Non-Python Projects) Source: https://context7.com/ak110/pyfltr/llms.txt Configure Pyfltr as a local pre-commit hook for non-Python projects using `uvx`. Specify entry point, file types, and serial execution. ```yaml # For non-Python projects repos: - repo: local hooks: - id: pyfltr name: pyfltr fast entry: uvx pyfltr fast types_or: [rust, markdown, toml, yaml] require_serial: true language: system ``` -------------------------------- ### Define Custom Linter Command: Bandit Source: https://context7.com/ak110/pyfltr/llms.txt Add Bandit as a custom linter command. Specify the path, arguments, file targets, and a custom error pattern for parsing output. Enables fast execution. ```toml [tool.pyfltr.custom-commands.bandit] type = "linter" path = "bandit" args = ["-r", "-f", "custom"] targets = "*.py" error-pattern = '(?P[^:]+):(?P\d+):(?P\d+):\s*(?P.+)' fast = true ``` -------------------------------- ### Run CI Checks via CLI Source: https://context7.com/ak110/pyfltr/llms.txt Executes all enabled checks, failing if formatters modify files. Suitable for CI environments. ```bash # Run all checks (ci is the default subcommand) pyfltr ci # Same as above - ci is implicit pyfltr # Run on specific files or directories pyfltr ci src/ tests/ # Run with specific tools only pyfltr ci --commands=ruff-check,mypy # Run in CI mode (disables UI, no shuffle) pyfltr --ci ``` -------------------------------- ### Pyfltr Pre-commit Hook Configuration (Python Projects) Source: https://context7.com/ak110/pyfltr/llms.txt Configure Pyfltr as a local pre-commit hook for Python projects using `uv run`. Specify entry point, file types, and serial execution. ```yaml # .pre-commit-config.yaml for Python projects repos: - repo: local hooks: - id: pyfltr name: pyfltr fast entry: uv run --frozen pyfltr fast types_or: [python, markdown, toml] require_serial: true language: system ``` -------------------------------- ### Run Pyfltr with JSONL Output Source: https://context7.com/ak110/pyfltr/llms.txt Execute Pyfltr commands and output results in JSON Lines (JSONL) format for LLM integration. Suppress text logging by default or direct output to a file. ```bash # Output JSONL to stdout (suppresses text logging) pyfltr run --output-format=jsonl # Output JSONL to file while showing text progress pyfltr run --output-format=jsonl --output-file=results.jsonl # Typical LLM workflow - get summary first pyfltr run --output-format=jsonl | tail -30 ``` -------------------------------- ### Run Auto-fix Checks via CLI Source: https://context7.com/ak110/pyfltr/llms.txt Executes checks with automatic fixing enabled, exiting with 0 even if files are modified. ```bash # Run all checks with auto-fix pyfltr run # Run on specific files pyfltr run src/main.py tests/ # Run specific tools pyfltr run --commands=format,lint # Disable fix stage pyfltr run --no-fix ``` -------------------------------- ### JS/TS Tool Configuration with Pyfltr Source: https://context7.com/ak110/pyfltr/llms.txt Configure JavaScript/TypeScript tools like ESLint, Prettier, Biome, OXLint, and Vitest within Pyfltr. Set the `js-runner` and specify tool-specific arguments, including fix arguments. ```toml [tool.pyfltr] # Use project's node_modules via pnpm js-runner = "pnpm" # Options: pnpx (default), pnpm, npm, npx, yarn, direct eslint = true prettier = true biome = true oxlint = true vitest = true # Prettier uses two-stage execution (--check then --write) prettier-args = ["--cache"] # ESLint with fix support eslint-fix-args = ["--fix"] # Biome check with safe fixes biome-args = ["check"] biome-fix-args = ["--write"] ``` -------------------------------- ### Custom Command with Auto-fix Support Source: https://context7.com/ak110/pyfltr/llms.txt Define a custom linter command that supports automatic fixing. Add `fix-args` to enable the fix stage for `run` and `fast` subcommands. ```toml [tool.pyfltr.custom-commands.my-linter] type = "linter" path = "my-linter" args = ["--check"] fix-args = ["--fix"] # Added after args in fix mode targets = "*.py" fast = true ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.