Skip to content

Commit 614b0ba

Browse files
committed
Remove PyTensor from class name
1 parent aea88ec commit 614b0ba

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pytensor/configparser.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
_logger = logging.getLogger("pytensor.configparser")
2222

2323

24-
class PyTensorConfigWarning(Warning):
24+
class ConfigWarning(Warning):
2525
@classmethod
2626
def warn(cls, message: str, stacklevel: int = 0):
2727
warnings.warn(message, cls, stacklevel=stacklevel + 3)
@@ -62,7 +62,7 @@ def __exit__(self, *args):
6262
v.__set__(self._root, self.old_vals[k])
6363

6464

65-
class PyTensorConfigParser:
65+
class ConfigParser:
6666
"""Object that holds configuration settings."""
6767

6868
# add_basic_configvars
@@ -551,7 +551,7 @@ def parse_config_string(
551551
kv_tuple = kv_pair.split("=", 1)
552552
if len(kv_tuple) == 1:
553553
if issue_warnings:
554-
PyTensorConfigWarning.warn(
554+
ConfigWarning.warn(
555555
f"Config key '{kv_tuple[0]}' has no value, ignoring it",
556556
stacklevel=1,
557557
)
@@ -581,7 +581,7 @@ def config_files_from_pytensorrc() -> list[Path]:
581581
return paths
582582

583583

584-
def _create_default_config() -> PyTensorConfigParser:
584+
def _create_default_config() -> ConfigParser:
585585
# The PYTENSOR_FLAGS environment variable should be a list of comma-separated
586586
# [section__]option=value entries. If the section part is omitted, there should
587587
# be only one section that contains the given option.
@@ -608,7 +608,7 @@ def _create_default_config() -> PyTensorConfigParser:
608608

609609
# Instances of PyTensorConfigParser can have independent current values!
610610
# But because the properties are assigned to the type, their existence is global.
611-
config = PyTensorConfigParser(
611+
config = ConfigParser(
612612
flags_dict=PYTENSOR_FLAGS_DICT,
613613
pytensor_cfg=pytensor_cfg,
614614
pytensor_raw_cfg=pytensor_raw_cfg,

tests/test_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
def _create_test_config():
16-
return configparser.PyTensorConfigParser(
16+
return configparser.ConfigParser(
1717
flags_dict={},
1818
pytensor_cfg=stdlib_configparser.ConfigParser(),
1919
pytensor_raw_cfg=stdlib_configparser.RawConfigParser(),

0 commit comments

Comments
 (0)