Skip to content

fix: assign config flags directly in API.__init__ (#5)#135

Merged
martinkersner merged 1 commit into
mainfrom
fix/api-init-config-ordering
Jul 3, 2026
Merged

fix: assign config flags directly in API.__init__ (#5)#135
martinkersner merged 1 commit into
mainfrom
fix/api-init-config-ordering

Conversation

@martinkersner

Copy link
Copy Markdown
Member

Summary

First of 4 small, independent PRs cleaning up the hand-written SDK surface (issues #1#5 from a structure review). This one fixes the config-ordering smell in API.__init__.

proxies, show_limit_usage, and show_header were hardcoded to None/False, then conditionally overwritten by if blocks lower in the constructor. Collapsed to direct assignment from the params.

  • proxies → kept the type(proxies) is dict guard, inline
  • show_limit_usage / show_headerbool(...) (was is True; now also accepts truthy, which is friendlier)

No behavior change for existing callers passing bools/dicts.

Tests

  • pytest -m "not integration": 134 passed, 11 skipped
  • black + flake8 clean on datamaxi/api.py

Known failures

None.

…it__

Params were hardcoded to None/False then conditionally overwritten below;
collapse to direct assignment. Same behavior, no dead override dance.
@martinkersner martinkersner merged commit ee0627c into main Jul 3, 2026
5 checks passed
@martinkersner martinkersner deleted the fix/api-init-config-ordering branch July 3, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant