Tm1 provider - #36
Conversation
`--select` could only replace the whole rule set. Two new selectors adjust
it instead:
linti processes/ --extend-select D110 --ignore F220
Same patterns as --select, repeatable and comma-separated. --exclude-rule
wins over everything, --select replaces, --extend-select adds; both selects
override `enabled: false`.
Selectors that cannot take effect now warn instead of failing silently: a
typo (F22O) points at `linti explain`, and P900 — the parser's nesting cap,
which has no rule to add or drop — points at `max_nesting_depth`. Parsed
once per run via RuleSelection, since lint_files builds a rule set per file.
Assited by: Claude Code
Read-only TM1 provider behind a new `linti tm1` command group. - `pip install "linti[tm1]"` — TM1py/keyring optional; the provider is duck-typed and works without them installed. - Passwords in the system keyring (`linti tm1 login`), resolved via env var → keyring → TTY prompt. No `--password` flag. - Profiles in a per-user `connections.yaml` that cannot hold secrets. - Generated-statements block and CRLF stripped, so no F270 noise and line numbers match the process editor. - No write-back yet: `--auto-fix` is refused with an explanation. Also fixes `from linti import *`, which raised AttributeError. Assisted by: Claude Code
|
Reviewed main...HEAD (2 commits: --extend-select/--exclude-rule selectors, and the read-only TM1 provider + linti tm1 command group). Full suite passes (1484 tests). The selector precedence logic in rule_factory.py checked out — exclude → select → extend_select → enabled is implemented exactly as documented, enabled is genuinely dead after the gate, and all call sites were migrated to RuleSelection. decode_procedure's prefix/newline invariant holds across the edge cases I traced (leading blanks, repeated marker pairs, unterminated BEGIN, no trailing newline, empty input). Findings: src/linti/tm1/connections.py:70 — Secret-key guard is case-sensitive and covers only 5 exact names. Password:/PASSWORD:/pwd: falls through to pydantic's extra_forbidden error, which renders input_value='hunter2'; that string becomes the ConnectionsError message and _load_profile echoes it to stderr. Directly defeats the guarantee stated in the module docstring; the existing test only covers lowercase password. |
No description provided.