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

Prevent empty Round passes and type guarding #84

Merged
merged 3 commits into from
Mar 20, 2024
Merged

Conversation

jatkinson1000
Copy link
Owner

Closes #57

  • Added a check to raise ValueError if empty iterable is passed to Round constructor.
  • Also added some guards against archeryutils types passed to constructors.

Checklist:

  • Source code updated to address issue
  • Style and formatting applied
  • Tests written to cover changes
  • Docstrings included/updated in code
  • Project documentation updated as necessary

@jatkinson1000 jatkinson1000 added the bug Something isn't working label Mar 8, 2024
@jatkinson1000 jatkinson1000 self-assigned this Mar 8, 2024
archeryutils/rounds.py Outdated Show resolved Hide resolved
@TomHall2020
Copy link
Contributor

Seems fair, simple fixes.

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.64%. Comparing base (fd2f524) to head (3c47ff1).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
+ Coverage   97.61%   97.64%   +0.02%     
==========================================
  Files          28       28              
  Lines        1592     1611      +19     
==========================================
+ Hits         1554     1573      +19     
  Misses         38       38              
Files Coverage Δ
archeryutils/rounds.py 100.00% <100.00%> (ø)
archeryutils/tests/test_rounds.py 100.00% <100.00%> (ø)

@jatkinson1000 jatkinson1000 merged commit 347e105 into main Mar 20, 2024
12 checks passed
@jatkinson1000 jatkinson1000 deleted the round-passes branch March 20, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Possibility to define a round with no passes
2 participants