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

handle FileNotFoundError in parse_requirements function #397

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

mateuslatrova
Copy link
Contributor

When the function "parse_requirements.txt" does not find the file passed as a parameter, it just raises an OSError.

This PR changes that behavior. Now, when that happens, this function handles it by printing a helpful message to the user and ends the program execution immediately.

@fredgrub
Copy link
Contributor

fredgrub commented Oct 4, 2023

This PR is related to PR #392. Since this PR modifies the functioning of the parse_requirements function, we must accept it first.

@codecov-commenter
Copy link

codecov-commenter commented Oct 4, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (55eee29) 89.96% compared to head (4a28ae7) 90.07%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             next     #397      +/-   ##
==========================================
+ Coverage   89.96%   90.07%   +0.11%     
==========================================
  Files           2        2              
  Lines         259      262       +3     
==========================================
+ Hits          233      236       +3     
  Misses         26       26              
Files Coverage Δ
pipreqs/pipreqs.py 89.96% <87.23%> (+0.11%) ⬆️

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

@alan-barzilay
Copy link
Collaborator

LGTM just remove the white trailing space please

@alan-barzilay
Copy link
Collaborator

ah, and rebase, thx

@mateuslatrova mateuslatrova force-pushed the handle_exception branch 2 times, most recently from 63e5baf to 8f351c6 Compare October 9, 2023 20:23
@mateuslatrova
Copy link
Contributor Author

@alan-barzilay rebased and fixed the white trailing space.

tests/test_pipreqs.py Show resolved Hide resolved
pipreqs/pipreqs.py Show resolved Hide resolved
@alan-barzilay alan-barzilay merged commit 368e9ae into bndr:next Oct 20, 2023
7 checks passed
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.

4 participants