Verbose parameter not working

Open
#477 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
devops

Research direction

Start in src/dotenv/main.py around line 61, then reproduce the missing-file cases with dotenv_values(..., verbose=True) from the issue. Verify the verbose path emits the documented warning when the .env file is missing, and add or update coverage for that behavior if the repository has a relevant test location.

Written by the indexing model from the issue text.

Description

The verbose parameter verbose: Whether to output a warning the .env file is missing. doesn't raise any warning.

>>> from dotenv import dotenv_values
>>> dotenv_values()
OrderedDict()
>>> dotenv_values(verbose=True)
OrderedDict()
>>> dotenv_values("a", verbose=True)
OrderedDict()
>>> dotenv_values(".", verbose=True)
OrderedDict()
>>> dotenv_values("/", verbose=True)
OrderedDict()
>>> dotenv_values("?", verbose=True)
OrderedDict()
>>> dotenv_values("¨", verbose=True)
OrderedDict()

The verbose doesn't seem to have any effect.
logger.info() was used instead of logger.warning() as it should. -> https://github.com/theskumar/python-dotenv/blob/3ffcef60d10813b72ecf85d5941d51b0207cd40e/src/dotenv/main.py#L61

Dominant language
Python
Stars
8.9k
Forks
581
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from theskumar/python-dotenv

All issues in theskumar/python-dotenv

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.