eranheres / ultra_type

0 stars 0 forks source link

Add keystroke timing tracking #26

Open sweep-mine[bot] opened 11 months ago

sweep-mine[bot] commented 11 months ago

Description

This pull request adds keystroke timing tracking to the project.

Summary

Fixes #25.


🎉 Latest improvements to Sweep:


💡 To get Sweep to edit this pull request, you can:

sweep-mine[bot] commented 11 months ago

Sandbox Executions

sweep-mine[bot] commented 11 months ago

Apply Sweep Rules to your PR?

sweep-mine[bot] commented 11 months ago

The command: Run # stop the build if there are Python syntax errors or undefined names yielded the following error: ##[error]Process completed with exit code 1. Here are the logs:

./tests/test_statistics.py:45:26: F821 undefined name 'expected_stats'
self.assertEqual(expected_stats, actual_stats)
^
./ultra_type/statistics.py:18:10: E999 SyntaxError: unmatched '}'
1     E999 SyntaxError: unmatched '}'
1     F821 undefined name 'expected_stats'
2
sweep-mine[bot] commented 11 months ago

The command: Run # stop the build if there are Python syntax errors or undefined names yielded the following error:

[error]Process completed with exit code 1.

Here are the logs: ./tests/test_statistics.py:45:26: F821 undefined name 'expected_stats' self.assertEqual(expected_stats, actual_stats) ^ ./ultra_type/statistics.py:18:10: E999 SyntaxError: unmatched '}' 1 E999 SyntaxError: unmatched '}' 1 F821 undefined name 'expected_stats' 2

Hi @sweep-mine[bot],

I am making the following changes:

File Path Proposed Changes
tests/test_statistics.py Modify tests/test_statistics.py with contents:
• Locate the test method test_get_stats_with_zero_total around line 43.
• Define the variable expected_stats before it is used in the assertion on line 45. The definition should be expected_stats = {'success_rate': 0} to match the expected output when the total count is zero.
• Remove the duplicate test method test_get_stats_with_zero_total that starts on line 43, as there is already a correctly implemented method with the same name starting on line 47.
tests/test_statistics.py Run tests/test_statistics.py through the sandbox.
ultra_type/statistics.py Modify ultra_type/statistics.py with contents:
• Locate the get_stats method within the Statistics class.
• Remove the unmatched '}' at the end of the get_stats method, which is currently on line 18.
• Ensure that the closing brace for the get_stats method is correctly placed after the return statement, with proper indentation.
ultra_type/statistics.py Run ultra_type/statistics.py through the sandbox.