Skip to content

docs: fix parameter name in Explorable.get_query_result docstring - #42646

Open
LALITH0110 wants to merge 1 commit into
apache:masterfrom
LALITH0110:docs/get-query-result-param-name
Open

docs: fix parameter name in Explorable.get_query_result docstring#42646
LALITH0110 wants to merge 1 commit into
apache:masterfrom
LALITH0110:docs/get-query-result-param-name

Conversation

@LALITH0110

Copy link
Copy Markdown

SUMMARY

Explorable.get_query_result documented :param query_obj:, but the parameter is named query_object:

def get_query_result(self, query_object: QueryObject) -> QueryResult:
    """
    ...
    :param query_obj: QueryObject describing the query

So the docstring described a parameter that does not exist on the method, and the real one was left undocumented. Since this is the primary data-retrieval method on the Explorable protocol, the reference is worth having right.

One line. Documentation only — no behaviour change.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Not applicable — docstring change, no UI.

TESTING INSTRUCTIONS

No behaviour to exercise; the change is a single word in a docstring. Verified mechanically that the documented parameter now matches the signature:

import ast, re
src = open("superset/explorables/base.py").read()
fn = next(n for n in ast.walk(ast.parse(src))
          if isinstance(n, ast.FunctionDef) and n.name == "get_query_result")
print([a.arg for a in fn.args.args if a.arg != "self"])          # ['query_object']
print(re.findall(r":param (\w+):", ast.get_docstring(fn)))        # ['query_object']

pre-commit run --files superset/explorables/base.py passes in full, including mypy, ruff, ruff-format and pylint.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Found by comparing documented :param entries against actual function signatures.

The docstring documented `:param query_obj:`, but the parameter is named
`query_object`, so the documented name did not exist on the method and the
real one was undocumented.
@dosubot dosubot Bot added the doc:developer Developer documentation label Jul 31, 2026
@bito-code-review

bito-code-review Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #e0704b

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: abce68c..abce68c
    • superset/explorables/base.py
  • Files skipped - 0
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.44%. Comparing base (7d2b184) to head (abce68c).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #42646   +/-   ##
=======================================
  Coverage   65.44%   65.44%           
=======================================
  Files        2810     2810           
  Lines      159362   159362           
  Branches    36372    36372           
=======================================
  Hits       104301   104301           
  Misses      53019    53019           
  Partials     2042     2042           
Flag Coverage Δ
hive 38.09% <ø> (ø)
mysql 57.82% <ø> (ø)
postgres 57.87% <ø> (ø)
presto 39.98% <ø> (ø)
python 59.25% <ø> (ø)
sqlite 57.49% <ø> (ø)
unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc:developer Developer documentation size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant