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

Improve DotenvType to accept str #96

Merged
merged 1 commit into from
Jul 4, 2023
Merged

Improve DotenvType to accept str #96

merged 1 commit into from
Jul 4, 2023

Conversation

hramezani
Copy link
Member

@hramezani hramezani commented Jul 3, 2023

Fixes first error reported in #95

test.py:4: error: Incompatible types (expression has type "str", TypedDict item "env_file" has type "Path | list[Path] | tuple[Path, ...] | None")  [typeddict-item]

Selected Reviewer: @samuelcolvin

@codecov
Copy link

codecov bot commented Jul 3, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (107e8de) 97.42% compared to head (96ecb61) 97.42%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #96   +/-   ##
=======================================
  Coverage   97.42%   97.42%           
=======================================
  Files           5        5           
  Lines         311      311           
  Branches       68       68           
=======================================
  Hits          303      303           
  Misses          6        6           
  Partials        2        2           
Impacted Files Coverage Δ
pydantic_settings/sources.py 97.70% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hramezani
Copy link
Member Author

please review

Copy link
Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

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

We don't test these?

@hramezani
Copy link
Member Author

We don't test these?

We have some tests that include the string env_file in the config.

Which kind of tests do you mean?

@Kludex
Copy link
Member

Kludex commented Jul 4, 2023

We don't test these?

We have some tests that include the string env_file in the config.

Which kind of tests do you mean?

Any test that would avoid a regression here. 👀

@hramezani
Copy link
Member Author

We don't test these?

We have some tests that include the string env_file in the config.
Which kind of tests do you mean?

Any test that would avoid a regression here. 👀

It's a mypy error and we don't have mypy tests here.

test.py:4: error: Incompatible types (expression has type "str", TypedDict item "env_file" has type "Path | list[Path] | tuple[Path, ...] | None") [typeddict-item]

@hramezani hramezani merged commit 3c4613d into main Jul 4, 2023
20 checks passed
@hramezani hramezani deleted the improve_dotenvtype branch July 4, 2023 11:48
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.

None yet

3 participants