DMOJ / online-judge

A modern open-source online judge and contest platform system.
https://dmoj.ca
GNU Affero General Public License v3.0
928 stars 359 forks source link

views/data: fix get_valid_files #2310

Closed Riolku closed 8 months ago

Riolku commented 8 months ago

Before #2197, get_valid_files returned a List[str]. Then it returned an Option[List[str]], because we wanted to flag invalid zips. This caused issues with iterating, and is a pretty terrible design.

Instead, we just re-raise the BadZipfile, and handle it in the two places this function is used.

codecov-commenter commented 8 months ago

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (1bacacb) 46.82% compared to head (9bf5045) 46.80%.

Files Patch % Lines
judge/views/problem_data.py 11.76% 15 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2310 +/- ## ========================================== - Coverage 46.82% 46.80% -0.03% ========================================== Files 250 250 Lines 13283 13291 +8 ========================================== + Hits 6220 6221 +1 - Misses 7063 7070 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.