sweepai / evals

Apache License 2.0
0 stars 0 forks source link

Add comments and docstrings to main.py and api.py #135

Closed sweep-nightly[bot] closed 10 months ago

sweep-nightly[bot] commented 10 months ago

Description

This PR adds comments and docstrings to the main.py and api.py files in the src directory. The comments and docstrings enhance the readability and maintainability of the code by providing clear explanations of the purpose and functionality of each section of the code.

Summary of Changes

Fixes #11.


πŸŽ‰ Latest improvements to Sweep:


πŸ’‘ To get Sweep to edit this pull request, you can:

sweep-nightly[bot] commented 10 months ago

Sandbox Executions

trunk fmt src/main.py || exit 0 1/4 βœ“
 βœ” Formatted src/main.py
Re-checking autofixed files...

 βœ” Formatted src/main.py
Re-checking autofixed files...

Checked 1 file
βœ” No issues
Run trunk upgrade to upgrade 1 linter
trunk check --fix --print-failures src/main.py 2/4 βœ“
 βœ” Auto-fixed src/main.py
Re-checking autofixed files...

  ISSUES  
src/main.py:5:17
  5:17  high  `numpy` imported but unused                              ruff/F401
 65:5   high  Loop control variable `epoch` not used within loop body  ruff/B007
Checked 1 file
2 existing issues (2 auto-fixable)
if [[ $(echo "src/main.py" | grep 'test.*\.py$') ]]; then PYTHONPATH=. python src/main.py; else exit 0; fi 3/4 βœ“
(nothing was outputted)
if [[ "src/main.py" == *test*.py ]]; then PYTHONPATH=. pytest src/main.py; else exit 0; fi 4/4 βœ“
(nothing was outputted)

trunk fmt src/api.py || exit 0 1/4 βœ“
 βœ” Formatted src/api.py
Re-checking autofixed files...

 βœ” Formatted src/api.py
Re-checking autofixed files...

Checked 1 file
βœ” No issues
Run trunk upgrade to upgrade 1 linter
trunk check --fix --print-failures src/api.py 2/4 βœ“
  ISSUES  
src/api.py:30:38
 30:38  high  Do not perform function call `File` in argument defaults  ruff/B008
Checked 1 file
1 existing issue
if [[ $(echo "src/api.py" | grep 'test.*\.py$') ]]; then PYTHONPATH=. python src/api.py; else exit 0; fi 3/4 βœ“
(nothing was outputted)
if [[ "src/api.py" == *test*.py ]]; then PYTHONPATH=. pytest src/api.py; else exit 0; fi 4/4 βœ“
(nothing was outputted)

sweep-nightly[bot] commented 10 months ago

Apply Sweep Rules to your PR?