Clear ruff debt and make full-tree ruff check a CI gate#1
Merged
Conversation
Fix all pre-existing lint issues so `ruff check src/` passes, then drop the non-blocking informational full-tree step in favor of a single gating step. - UP042: convert str+Enum classes to StrEnum (ConnectorType, ValidationStatus, LLMProviderType, QueryComplexity); behavior is equivalent (value comparisons, .value access, value lookup, dict keys all unchanged) - B904: chain re-raised ValueErrors with `from err` in the registries - B905: pass strict=True to zip() in db/vectors._cosine - E402: move logger assignment below imports in the semantic resolvers - N818: rename EmbeddingsUnavailable -> EmbeddingsUnavailableError (internal) - E501: reflow real code lines; waive prompt-template and IFRS 9 seed-data string literals via [tool.ruff.lint.per-file-ignores] Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace the local ../querywise path with https://github.com/kosminus/querywise. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Clears all pre-existing
rufflint debt soruff check src/passes on the full tree, then turns it into a hard CI gate (replacing the previous non-blocking informational step). Also fixes the QueryWise link in the README.Lint fixes
str+Enumclasses toStrEnum:ConnectorType,ValidationStatus,LLMProviderType,QueryComplexity. Behavior is equivalent for how they're used (value comparisons,.valueaccess, value lookup, dict keys — verified at runtime).ValueErrors withfrom errinconnector_registryandprovider_registry.strict=Truetozip()indb/vectors._cosine(lengths already guarded equal).loggerassignment below imports incontext_builderandglossary_resolver.EmbeddingsUnavailable→EmbeddingsUnavailableError(internal-only, all refs in one file).glossary_resolver,schema_linker,sample_data); waive prompt-template and IFRS 9 seed-data string literals via[tool.ruff.lint.per-file-ignores](llm/prompts/*,llm/agents/error_handler.py,services/setup_service.py).CI
.github/workflows/ci.ymlnow runs a single gatingruff check src/step; the server.py-only step and thecontinue-on-errorfull-tree step are removed.Verification
Ran locally on the branch:
ruff check src/→ All checks passedpython -m compileall src/→ OKpython -c "import querywise_mcp.server"→ import OK🤖 Generated with Claude Code