Skip to content

Commit

Permalink
Simplify dependencies by not using pyutils.reraise
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 692877334
  • Loading branch information
tomvdw authored and The TensorFlow Datasets Authors committed Nov 4, 2024
1 parent c03fd8d commit 96f8363
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tensorflow_datasets/core/naming.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
from typing import Any

from etils import epath
from tensorflow_datasets.core.utils import py_utils
from tensorflow_datasets.core.utils import version as version_lib

_NAME_CLASS = r'[a-zA-Z][\w]*'
Expand Down Expand Up @@ -185,8 +184,9 @@ def _dataset_name_and_kwargs_from_name_str(
raise ValueError('Dataset %s: cannot pass %s twice.' % (name, attr))
kwargs[attr] = val
return name, kwargs
except Exception as e: # pylint: disable=broad-except
py_utils.reraise(e, prefix=err_msg) # pytype: disable=bad-return-type
except Exception as e:
e.add_note(err_msg)
raise e


@dataclasses.dataclass(order=True)
Expand Down
1 change: 0 additions & 1 deletion tensorflow_datasets/core/utils/file_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from tensorflow_datasets.core import constants
from tensorflow_datasets.core import naming
from tensorflow_datasets.core.utils import file_utils
from tensorflow_datasets.core.utils import read_config

_DATA_DIR = epath.Path('/a')
_DATASET_NAME = 'my_ds'
Expand Down

0 comments on commit 96f8363

Please sign in to comment.