Closed davidemarcoli closed 7 months ago
The recent modifications in the project primarily focus on refining debug outputs and enhancing the efficiency of existing functionalities. The handlers.py
file sees an adjustment in handler attributes and a streamlined process for episode number extraction. Meanwhile, parse.py
optimizes debug message management by incorporating a conditional flag.
File | Summary |
---|---|
.../handlers.py |
Adjusted remove attribute from True to False in handler settings and simplified episode number extraction logic. |
.../parse.py |
Removed unnecessary print statements; added conditional debug printing based on the DEBUG_HANDLER flag. |
🐰✨ A rabbit hopped through the code,
Tweaking lines where bugs once bode.
No more prints spill on the floor,
Handlers tweaked, less is more.
Hop, skip, a code ballet,
Debug whispers now hold sway.
🌟📜
PTT/handlers.py (86)
1-10: Import block is un-sorted or un-formatted --- 10-10: `add_defaults` is too complex (19 > 10) --- 10-10: Too many statements (300 > 50) --- 106-106: Single quotes found but double quotes preferred --- 107-107: Single quotes found but double quotes preferred --- 109-109: Single quotes found but double quotes preferred --- 109-109: Single quotes found but double quotes preferred --- 148-148: Single quotes found but double quotes preferred --- 149-149: Single quotes found but double quotes preferred --- 150-150: Single quotes found but double quotes preferred --- 153-153: Single quotes found but double quotes preferred --- 153-153: Single quotes found but double quotes preferred --- 156-156: Single quotes found but double quotes preferred --- 160-160: Single quotes found but double quotes preferred --- 160-160: Single quotes found but double quotes preferred --- 160-160: Single quotes found but double quotes preferred --- 163-163: Single quotes found but double quotes preferred --- 167-167: Single quotes found but double quotes preferred --- 168-168: Single quotes found but double quotes preferred --- 169-169: Single quotes found but double quotes preferred --- 225-225: Single quotes found but double quotes preferred --- 226-226: Single quotes found but double quotes preferred --- 227-227: Single quotes found but double quotes preferred --- 229-229: Single quotes found but double quotes preferred --- 231-231: Single quotes found but double quotes preferred --- 231-231: Single quotes found but double quotes preferred --- 231-231: Single quotes found but double quotes preferred --- 231-231: Single quotes found but double quotes preferred --- 232-232: Single quotes found but double quotes preferred --- 233-233: Single quotes found but double quotes preferred --- 233-233: Single quotes found but double quotes preferred --- 233-233: Single quotes found but double quotes preferred --- 234-234: Single quotes found but double quotes preferred --- 234-234: Single quotes found but double quotes preferred --- 244-244: Single quotes found but double quotes preferred --- 244-244: Single quotes found but double quotes preferred --- 248-248: Single quotes found but double quotes preferred --- 249-249: Single quotes found but double quotes preferred --- 250-250: Single quotes found but double quotes preferred --- 367-367: Single quotes found but double quotes preferred --- 368-368: Single quotes found but double quotes preferred --- 369-369: Single quotes found but double quotes preferred --- 370-374: Use a single `if` statement instead of nested `if` statements --- 370-370: Single quotes found but double quotes preferred --- 370-370: Single quotes found but double quotes preferred --- 370-370: Single quotes found but double quotes preferred --- 370-370: Single quotes found but double quotes preferred --- 372-372: Single quotes found but double quotes preferred --- 372-372: Single quotes found but double quotes preferred --- 372-372: Single quotes found but double quotes preferred --- 372-372: Single quotes found but double quotes preferred --- 372-372: Single quotes found but double quotes preferred --- 374-374: Single quotes found but double quotes preferred --- 375-375: Single quotes found but double quotes preferred --- 375-375: Single quotes found but double quotes preferred --- 375-375: Single quotes found but double quotes preferred --- 377-377: Single quotes found but double quotes preferred --- 383-383: Single quotes found but double quotes preferred --- 384-384: Single quotes found but double quotes preferred --- 384-384: Single quotes found but double quotes preferred --- 384-384: Single quotes found but double quotes preferred --- 384-384: Single quotes found but double quotes preferred --- 385-385: Single quotes found but double quotes preferred --- 386-386: Single quotes found but double quotes preferred --- 393-393: Single quotes found but double quotes preferred --- 394-394: Single quotes found but double quotes preferred --- 395-395: Single quotes found but double quotes preferred --- 395-395: Single quotes found but double quotes preferred --- 395-395: Single quotes found but double quotes preferred --- 395-395: Single quotes found but double quotes preferred --- 395-395: Single quotes found but double quotes preferred --- 395-395: Single quotes found but double quotes preferred --- 395-395: Single quotes found but double quotes preferred --- 395-395: Single quotes found but double quotes preferred --- 396-396: Single quotes found but double quotes preferred --- 396-396: Single quotes found but double quotes preferred --- 396-396: Single quotes found but double quotes preferred --- 396-396: Single quotes found but double quotes preferred --- 396-396: Single quotes found but double quotes preferred --- 399-401: Use a single `if` statement instead of nested `if` statements --- 399-399: Single quotes found but double quotes preferred --- 399-399: Single quotes found but double quotes preferred --- 400-400: Single quotes found but double quotes preferred --- 401-401: Single quotes found but double quotes preferred --- 402-402: Single quotes found but double quotes preferred --- 403-403: Single quotes found but double quotes preferredPTT/parse.py (44)
1-6: Import block is un-sorted or un-formatted --- 33-33: Single quotes found but double quotes preferred --- 34-34: Single quotes found but double quotes preferred --- 35-35: Single quotes found but double quotes preferred --- 37-37: Single quotes found but double quotes preferred --- 41-41: `print` found --- 42-42: `print` found --- 46-46: `print` found --- 54-54: Single quotes found but double quotes preferred --- 59-59: `print` found --- 60-60: Single quotes found but double quotes preferred --- 61-61: Single quotes found but double quotes preferred --- 66-66: Single quotes found but double quotes preferred --- 66-66: Single quotes found but double quotes preferred --- 67-67: Single quotes found but double quotes preferred --- 69-69: Single quotes found but double quotes preferred --- 70-70: Single quotes found but double quotes preferred --- 71-71: Single quotes found but double quotes preferred --- 71-71: Single quotes found but double quotes preferred --- 72-72: Single quotes found but double quotes preferred --- 72-72: Single quotes found but double quotes preferred --- 100-100: Unnecessary assignment to `cleaned_title` before `return` statement --- 112-112: Do not compare types, use `isinstance()` --- 114-114: Do not compare types, use `isinstance()` --- 116-116: Do not compare types, use `isinstance()` --- 124-124: `parse` is too complex (13 > 10) --- 140-140: `print` found --- 143-143: `print` found --- 144-144: `print` found --- 148-148: `print` found --- 149-149: `print` found --- 152-152: Single quotes found but double quotes preferred --- 153-153: Single quotes found but double quotes preferred --- 153-153: Single quotes found but double quotes preferred --- 154-154: Single quotes found but double quotes preferred --- 155-155: Single quotes found but double quotes preferred --- 155-155: Single quotes found but double quotes preferred --- 156-156: Single quotes found but double quotes preferred --- 157-157: Single quotes found but double quotes preferred --- 158-158: Single quotes found but double quotes preferred --- 158-158: Single quotes found but double quotes preferred --- 159-159: Single quotes found but double quotes preferred --- 164-164: `print` found --- 165-165: `print` found
PTT/parse.py (1)
`139-152`: > :memo: **NOTE** > This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [140-165] Conditional debug printing is correctly implemented. Ensure consistency in the use of quotes for string literals. ```diff - print(handler.handler_name) - print("Title before: " + title) - print("Title after: " + title) - print(end_of_title) + print(handler.handler_name) + print("Title before: " + title) + print("Title after: " + title) + print(end_of_title) ```PTT/handlers.py (2)
`98-98`: Consider verifying the behavior change for the "source" handler. The change from `remove: True` to `remove: False` for the "source" handler with regex pattern for "DivX|XviD" might have implications on how data is processed in subsequent steps. Please ensure that this behavior change is intentional and tested, especially since the comment indicates uncertainty about why the test case fails with the original setting. --- `139-139`: Clarify the intended behavior for the "group" handler. The change from `remove: True` to `remove: False` for the "group" handler regex pattern is noted. Similar to the previous comment, it's important to verify that this change aligns with the intended parsing logic, especially since the comment indicates a discrepancy with the JavaScript implementation.
Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.
Thanks for integrating Codecov - We've got you covered :open_umbrella:
Summary by CodeRabbit