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

fix: don't raise NotAnIdentifier function #179

Merged
merged 3 commits into from
Mar 8, 2023

Conversation

mbhall88
Copy link
Member

closes #177

@codecov
Copy link

codecov bot commented Feb 26, 2023

Codecov Report

Merging #179 (faaad7d) into master (7b35c16) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #179   +/-   ##
=======================================
  Coverage   98.12%   98.12%           
=======================================
  Files          12       12           
  Lines        1012     1012           
  Branches      221      221           
=======================================
  Hits          993      993           
  Misses         10       10           
  Partials        9        9           
Flag Coverage Δ
unittests 98.02% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
snakefmt/parser/syntax.py 98.86% <100.00%> (ø)

@chillenzer
Copy link

Hi, thanks for putting this together. I didn't explicitly mention this in the issue but this is also true for ColonError, NewlineError, and SyntaxFormError.

@mbhall88
Copy link
Member Author

You made me realise that the issue was just that we were trying to raise a function, rather than just calling it.

@mbhall88 mbhall88 changed the title fix: subclass NotAnIdentifier to Exception fix: don't raise NotAnIdentifier function Feb 27, 2023
Copy link
Collaborator

@bricoletc bricoletc left a comment

Choose a reason for hiding this comment

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

I agree that simply calling the function, rather than erroneously raising it, is the simplest thing to do. Could you rebase -i this PR and remove the first commit, which is now unnecessary - it's just reverted in the last commit of this PR

I can do it if you want ;)

@mbhall88
Copy link
Member Author

Done Brice. Although I was just going to squash-merge this PR anyways.

@mbhall88 mbhall88 requested a review from bricoletc March 6, 2023 01:20
@mbhall88 mbhall88 merged commit 932df73 into snakemake:master Mar 8, 2023
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.

[Code curiosity] Exceptions
3 participants