ubclaunchpad / rocket2

🚀 The official UBC Launch Pad Slack bot and team management platform
https://rocket2.readthedocs.io
Other
18 stars 6 forks source link

fix: metrics now handles single-word cmds #593

Closed chuck-sys closed 4 years ago

chuck-sys commented 4 years ago

Ticket(s)

Fix #592

Details

The issue was that we assumed that the given command would always be 2 words when it could be 1! Who knew! Now, we add a check in front to actually check. We don't need the check in the second if statement because list slices auto-bound-check.

codecov[bot] commented 4 years ago

Codecov Report

Merging #593 into master will increase coverage by 0.08%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #593      +/-   ##
==========================================
+ Coverage   93.01%   93.09%   +0.08%     
==========================================
  Files          42       42              
  Lines        2420     2420              
  Branches      323      323              
==========================================
+ Hits         2251     2253       +2     
+ Misses        110      109       -1     
+ Partials       59       58       -1     
Impacted Files Coverage Δ
app/controller/command/parser.py 94.52% <0.00%> (ø)
app/controller/command/commands/iquit.py 100.00% <0.00%> (+2.77%) :arrow_up:

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 255ce39...6dd8f4c. Read the comment docs.