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

[MRG + 1] Convert filename to lowercase to check for extension #169

Merged
merged 2 commits into from
Oct 24, 2018
Merged

[MRG + 1] Convert filename to lowercase to check for extension #169

merged 2 commits into from
Oct 24, 2018

Conversation

vmesel
Copy link
Contributor

@vmesel vmesel commented Oct 23, 2018

PDF type checking fails if you have a PDF with a extension like: .PDF, .PdF, PDf, pdF.

This lowercase version of the variable should identify better if it's a PDF file.

@codecov-io
Copy link

codecov-io commented Oct 23, 2018

Codecov Report

Merging #169 into master will decrease coverage by 0.22%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #169      +/-   ##
==========================================
- Coverage    84.4%   84.17%   -0.23%     
==========================================
  Files          13       13              
  Lines        1212     1226      +14     
  Branches      290      294       +4     
==========================================
+ Hits         1023     1032       +9     
- Misses        146      150       +4     
- Partials       43       44       +1
Impacted Files Coverage Δ
camelot/handlers.py 83.33% <100%> (ø) ⬆️
camelot/parsers/lattice.py 89.47% <0%> (-2.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f734af3...d94f81c. Read the comment docs.

@vinayak-mehta
Copy link
Contributor

Thanks for catching this and submitting a PR! Instead of creating a new variable, can you add lower() to the if condition itself? if self.filename.lower().endswith.

@vmesel
Copy link
Contributor Author

vmesel commented Oct 23, 2018 via email

@vinayak-mehta
Copy link
Contributor

LGTM, will merge it after the fix!

@vinayak-mehta vinayak-mehta changed the title Creates a new variable that stores a lowercase version of the filename [MRG + 1] Convert filename to lowercase to check for extension Oct 24, 2018
@vinayak-mehta vinayak-mehta merged commit 39cf65f into atlanhq:master Oct 24, 2018
@vinayak-mehta
Copy link
Contributor

@vmesel Thanks for the catch and PR!

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.

None yet

3 participants