Skip to content

docs(cli): fix incorrect config class and parameter in example - #776

Merged
hasansezertasan merged 2 commits into
litestar-org:mainfrom
hasansezertasan:docs/fix-cli-config-example
Jul 22, 2026
Merged

docs(cli): fix incorrect config class and parameter in example#776
hasansezertasan merged 2 commits into
litestar-org:mainfrom
hasansezertasan:docs/fix-cli-config-example

Conversation

@hasansezertasan

@hasansezertasan hasansezertasan commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

The CLI documentation example in docs/usage/cli.rst would fail if copy-pasted:

  • SQLAlchemyConfig is not a real export — replaced with SQLAlchemySyncConfig
  • connection_url is not a valid parameter — replaced with connection_string
  • Removed an unused from sqlalchemy import create_engine import

Also fixed the matching prose in the Global Options table, which described --config as "an instance of SQLAlchemyConfig (sync or async)" — replaced with the real exported types SQLAlchemySyncConfig or SQLAlchemyAsyncConfig so the whole page is consistent.

Verified against source: advanced_alchemy/config/__init__.py exports only SQLAlchemySyncConfig / SQLAlchemyAsyncConfig, and the field is defined as connection_string in advanced_alchemy/config/common.py.

Closes #728


📚 Documentation preview: https://litestar-org.github.io/advanced-alchemy-docs-preview/776

`SQLAlchemyConfig` does not exist; use `SQLAlchemySyncConfig`.
The parameter is `connection_string`, not `connection_url`.
Also removed an unused `create_engine` import.

Closes litestar-org#728
@codecov-commenter

codecov-commenter commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@27bd3f5). Learn more about missing BASE report.
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #776   +/-   ##
=======================================
  Coverage        ?   82.45%           
=======================================
  Files           ?      105           
  Lines           ?     9039           
  Branches        ?     1219           
=======================================
  Hits            ?     7453           
  Misses          ?     1260           
  Partials        ?      326           

☔ 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.

The --config option description referenced the non-existent
SQLAlchemyConfig class. Replace with the actual exported types
SQLAlchemySyncConfig and SQLAlchemyAsyncConfig for consistency
with the corrected code example.
@hasansezertasan
hasansezertasan enabled auto-merge (squash) July 22, 2026 09:59

@cofin cofin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hasansezertasan
hasansezertasan merged commit 7952494 into litestar-org:main Jul 22, 2026
32 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: https://advanced-alchemy.litestar.dev/latest/usage/cli.html#init

3 participants