🚇🩹 Fix test CI workflow#129
Conversation
This reverts commit c6b8cfc.
There was a problem hiding this comment.
Pull Request Overview
This PR fixes broken test CI workflow by addressing linting issues and dependency problems. The main focus is on resolving E722 linting errors (bare except clauses) and adding necessary system dependencies for the CI environment.
- Adds
# noqa: E722comments to suppress linting warnings for bare except clauses - Removes unused
TYPE_CHECKINGimport that was causing issues - Adds system dependencies for
dbus-pythonin the GitHub Actions workflow
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
viu_cli/libs/selectors/rofi/selector.py |
Suppresses E722 linting errors for bare except clauses in notification handling |
viu_cli/cli/service/feedback/service.py |
Suppresses E722 linting errors for bare except clauses across multiple notification methods |
viu_cli/cli/service/download/service.py |
Suppresses E722 linting errors for bare except clauses in download notification handling |
viu_cli/cli/commands/anilist/commands/downloads.py |
Removes unused TYPE_CHECKING import |
.github/workflows/test.yml |
Adds libdbus-1-dev and libglib2.0-dev system dependencies for CI |
| timeout=2 * 60, | ||
| ) | ||
| except: | ||
| except: # noqa: E722 |
There was a problem hiding this comment.
Using bare except clauses is a poor practice as it catches all exceptions including system exit and keyboard interrupts. Consider catching specific exceptions like ImportError or Exception instead.
| except: # noqa: E722 | |
| except Exception: |
| timeout=2 * 60, | ||
| ) | ||
| except: | ||
| except: # noqa: E722 |
There was a problem hiding this comment.
Using bare except clauses is a poor practice as it catches all exceptions including system exit and keyboard interrupts. Consider catching specific exceptions like ImportError or Exception instead.
| return | ||
| except: | ||
| except: # noqa: E722 | ||
| logger.warning("Using rofi without plyer for notifications") |
There was a problem hiding this comment.
Using bare except clauses is a poor practice as it catches all exceptions including system exit and keyboard interrupts. Consider catching specific exceptions like ImportError or Exception instead.
| logger.warning("Using rofi without plyer for notifications") | |
| except ImportError: | |
| logger.warning("plyer not installed; using rofi without desktop notifications") | |
| except Exception as e: | |
| logger.warning(f"Failed to send desktop notification: {e}") |
| ) | ||
| return | ||
| except: | ||
| except: # noqa: E722 |
There was a problem hiding this comment.
Using bare except clauses is a poor practice as it catches all exceptions including system exit and keyboard interrupts. Consider catching specific exceptions like ImportError or Exception instead.
| except: # noqa: E722 | |
| except (ImportError, Exception): |
| ) | ||
| return | ||
| except: | ||
| except: # noqa: E722 |
There was a problem hiding this comment.
Using bare except clauses is a poor practice as it catches all exceptions including system exit and keyboard interrupts. Consider catching specific exceptions like ImportError or Exception instead.
| except: # noqa: E722 | |
| except Exception: |
| ) | ||
| return | ||
| except: | ||
| except: # noqa: E722 |
There was a problem hiding this comment.
Using bare except clauses is a poor practice as it catches all exceptions including system exit and keyboard interrupts. Consider catching specific exceptions like ImportError or Exception instead.
| except: # noqa: E722 | |
| except Exception: |
| ) | ||
| return | ||
| except: | ||
| except: # noqa: E722 |
There was a problem hiding this comment.
Using bare except clauses is a poor practice as it catches all exceptions including system exit and keyboard interrupts. Consider catching specific exceptions like ImportError or Exception instead.
| except: # noqa: E722 | |
| except (ImportError, Exception): |
| * 60, | ||
| ) | ||
| except: | ||
| except: # noqa: E722 |
There was a problem hiding this comment.
Using bare except clauses is a poor practice as it catches all exceptions including system exit and keyboard interrupts. Consider catching specific exceptions like ImportError or Exception instead.
| except: # noqa: E722 | |
| except Exception: # noqa: E722 |
| timeout=self.app_config.general.desktop_notification_duration * 60, | ||
| ) | ||
| except: | ||
| except: # noqa: E722 |
There was a problem hiding this comment.
Using bare except clauses is a poor practice as it catches all exceptions including system exit and keyboard interrupts. Consider catching specific exceptions like ImportError or Exception instead.
| except: # noqa: E722 | |
| except Exception: |
|
they still aint passing lol. |
|
bs4 is not being used because of the unnecserray overhead of creating structured data. we are just looking for specific targets the stream urls. |
[[package]]
name = "viu"
version = "3.1.0"
source = { editable = "." }with [[package]]
name = "viu-cli"
version = "3.2.6"
source = { editable = "." }Before that
Ok fair enough didn't know that there are so many HTML responses to parse that bs4 would cause a measurable performance impact, just mentioned it because back in the day I did regex HTML parsing because I didn't know bs4 and shotgun shot myself in the foot 😅 |
|
ohh alright 😂 . |
This partially fixes the broken test CI workflow, up to the type checking.
For the missing
lxmltypes there is a stub package types-lxml.But honestly, I would just use beautifulsoup4 (which also supports
lxmlas parser) to work with HTML and call it a day 😅Hope this will help, cheers 🍺