Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make av.ArgumentError a subclass of ValueError #2120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
WyattBlue merged 1 commit into main from patch
Jan 23, 2026
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion av/error.py
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def _extend_builtin(name, codes):
_extend_builtin("OSError", [code for code in errno.errorcode if code not in classes])


class ArgumentError(FFmpegError):
class ArgumentError(FFmpegError, ValueError):
def __str__(self):
msg = ""
if self.strerror is not None:
Expand Down
2 changes: 2 additions & 0 deletions tests/test_errors.py
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def test_stringify() -> None:

def test_bases() -> None:
assert issubclass(av.ArgumentError, av.FFmpegError)
# Deprecated, assert false for Major 18.0:
assert issubclass(av.ArgumentError, ValueError)
assert issubclass(av.FileNotFoundError, FileNotFoundError)
assert issubclass(av.FileNotFoundError, OSError)
assert issubclass(av.FileNotFoundError, av.FFmpegError)
Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /