Allow overwrite value by None if already defined
Maintainer thường phản hồi trong vòng 12 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start at the load_dotenv entry point and trace how a later file is handled when myVar is absent versus explicitly set to an empty value. Compare the two scenarios in the issue, then verify that loading .envA removes the earlier value and returns None when myVar is not defined there.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I have 2 dotenv files:
Scenario1:
/var/www/flask/.envRoot <---- myVar="foo"
and
/home/userA/.envA <----------- myVar="bar"
load_dotenv(dotenv_path='/var/www/flask/.envRoot',override=True)
os.getenv('myVar') # foo
load_dotenv(dotenv_path='/home/userA/.envA',override=True)
os.getenv('myVar') # bar
Scenario2:
/var/www/flask/.envRoot <---- myVar="foo"
and
/home/userA/.envA <----------- myVar not defined
load_dotenv(dotenv_path='/var/www/flask/.envRoot',override=True)
os.getenv('myVar') # foo
load_dotenv(dotenv_path='/home/userA/.envA',override=True)
os.getenv('myVar') # foo
Scenario1 work as spected, but Scenario2 should return None if do not exist on .envA because i explicitly indicate the file to look at. But this do not happen if the key exist e.g: myVar=, only if not defined.
- Ngôn ngữ chính
- Python
- Star
- 8.9k
- Fork
- 618
- Merge trung bình
- 12 ngày 6 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của theskumar/python-dotenv
-
Variable declared without a value suppresses ${VAR:-default} expansionCó thể đã có người làm @Omarinho12345 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
theskumar/python-dotenv#750 ·
Maintainer thường phản hồi trong vòng 12 ngày
-
An empty value ignores ${name:-default}Có thể đã có người làm @SashaMIT đã nhận 41 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
theskumar/python-dotenv#715 ·
Maintainer thường phản hồi trong vòng 12 ngày
-
set_key and unset_key don't fsync before replacing the .env fileCó thể đã có người làm @Imkkey đã nhận 40 ngày trước. Đang mởenhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
theskumar/python-dotenv#713 ·
Maintainer thường phản hồi trong vòng 12 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
theskumar/python-dotenv#693 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 12 ngày
-
python-dotenv installation without cli masks python-dotenv cliCó thể đã có người làm @gyanu2507 đã nhận 80 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
theskumar/python-dotenv#683 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 12 ngày
Tất cả issue của theskumar/python-dotenv
Issue tương tự
-
release
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
MichaelYcJo/SpecSeal#1535 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
valentinfrlch/ha-llmvision#769 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
daniel-ospina/tortoise#11937 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted python up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
andrewsiah/agentswarm-data-tasks#238 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
cadence-workflow/cadence-ai-samples#175 ·
Maintainer thường phản hồi trong vòng 1 ngày