Skip to content

Commit c1a209b

Browse files
committed
Remove more now-unused CompilerOptions methods
1 parent e83ca0b commit c1a209b

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

cmdstanpy/compilation.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
'warn-pedantic',
3737
]
3838

39-
4039
STANC_IGNORE_OPTS = [
4140
'debug-lex',
4241
'debug-parse',
@@ -88,26 +87,6 @@ def __repr__(self) -> str:
8887
self._stanc_options, self._cpp_options
8988
)
9089

91-
def __eq__(self, other: Any) -> bool:
92-
"""Overrides the default implementation"""
93-
if self.is_empty() and other is None: # equiv w/r/t compiler
94-
return True
95-
if not isinstance(other, CompilerOptions):
96-
return False
97-
return (
98-
self._stanc_options == other.stanc_options
99-
and self._cpp_options == other.cpp_options
100-
and self._user_header == other.user_header
101-
)
102-
103-
def is_empty(self) -> bool:
104-
"""True if no options specified."""
105-
return (
106-
self._stanc_options == {}
107-
and self._cpp_options == {}
108-
and self._user_header == ''
109-
)
110-
11190
@property
11291
def stanc_options(self) -> dict[str, Union[bool, int, str, Iterable[str]]]:
11392
"""Stanc compiler options."""
@@ -137,7 +116,6 @@ def validate_stanc_opts(self) -> None:
137116
Check stanc compiler args and consistency between stanc and C++ options.
138117
Raise ValueError if bad config is found.
139118
"""
140-
# pylint: disable=no-member
141119
if self._stanc_options is None:
142120
return
143121
ignore = []

test/test_compiler_opts.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,6 @@
1212
DATAFILES_PATH = os.path.join(HERE, 'data')
1313

1414

15-
def test_opts_empty_eq() -> None:
16-
opts_a = CompilerOptions()
17-
assert opts_a.is_empty()
18-
19-
opts_b = None
20-
assert opts_a == opts_b
21-
22-
opts_c = CompilerOptions(stanc_options={'O'})
23-
assert opts_a != opts_c != opts_b
24-
25-
stanc_opts = {}
26-
cpp_opts = {'STAN_THREADS': 'T'}
27-
opts_c = CompilerOptions(stanc_options=stanc_opts, cpp_options=cpp_opts)
28-
assert not opts_c.is_empty()
29-
assert opts_a != opts_c
30-
31-
3215
def test_opts_empty() -> None:
3316
opts = CompilerOptions()
3417
opts.validate()

0 commit comments

Comments
 (0)