There are some instances where I think code is effectively unreachable (unless called in a different way). For example:
https://github.com/iterative/dvc/blob/5c76b46b460e00d3bb5c3f2ea87b19d961491f12/dvc/command/add.py#L17
means that
https://github.com/iterative/dvc/blob/5c76b46b460e00d3bb5c3f2ea87b19d961491f12/dvc/repo/add.py#L22
is never called. Also I feel they should both be raising RecursiveAddingWhileUsingFilename.
Also, the exception above is explicitly caught and the message and type completely suppressed, which seems odd:
https://github.com/iterative/dvc/blob/5c76b46b460e00d3bb5c3f2ea87b19d961491f12/dvc/command/add.py#L27-L29
Surely instead it's better to just let it be raised? If we want to suppress stack trace for user-friendliness, then six.raise_from instead?
There are some instances where I think code is effectively unreachable (unless called in a different way). For example:
https://github.com/iterative/dvc/blob/5c76b46b460e00d3bb5c3f2ea87b19d961491f12/dvc/command/add.py#L17
means that
https://github.com/iterative/dvc/blob/5c76b46b460e00d3bb5c3f2ea87b19d961491f12/dvc/repo/add.py#L22
is never called. Also I feel they should both be raising
RecursiveAddingWhileUsingFilename.Also, the exception above is explicitly caught and the message and type completely suppressed, which seems odd:
https://github.com/iterative/dvc/blob/5c76b46b460e00d3bb5c3f2ea87b19d961491f12/dvc/command/add.py#L27-L29
Surely instead it's better to just let it be raised? If we want to suppress stack trace for user-friendliness, then
six.raise_frominstead?