Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(python): Annotate Config kwarg options #18988

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

etrotta
Copy link

@etrotta etrotta commented Sep 27, 2024

Adds a TypedDict listing all valid options you can pass directly to Config()

Closes #18987

@github-actions github-actions bot added documentation Improvements or additions to documentation python Related to Python Polars labels Sep 27, 2024
@etrotta
Copy link
Author

etrotta commented Sep 27, 2024

Regarding the mypy error,

Run mypy 
tests/unit/test_config.py:742: error: Unexpected keyword argument "i_do_not_exist" for "Config"  [call-arg]
polars/config.py:175: note: "Config" defined here
Found 1 error in 1 file (checked 535 source files)
Error: Process completed with exit code 1.

Is the usual approach just # type: ignore or there's something more appropriate for that? maybe something that asserts mypy should error?

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.86%. Comparing base (901b243) to head (5414338).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18988      +/-   ##
==========================================
- Coverage   79.88%   79.86%   -0.03%     
==========================================
  Files        1524     1524              
  Lines      207634   207683      +49     
  Branches     2904     2904              
==========================================
- Hits       165873   165857      -16     
- Misses      41214    41279      +65     
  Partials      547      547              

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Config type hints
1 participant