Skip to content

Commit 336014c

Browse files
committed
Update
1 parent 4497ead commit 336014c

File tree

4 files changed

+8
-109
lines changed

4 files changed

+8
-109
lines changed

highpymath/__init__.py

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
from .highpymath import MathValueError as _mve
22
from .highpymath import GeometryError as _ge
3-
from .highpymath import MathBaseError as _mbe
4-
from .exceptions import MathTypeError
5-
from .fast import fast_div as fdiv
6-
from .fast import fast_mul as fmul
7-
from .fast import fast_exp as fexp
3+
from .highpymath import MathTypeError as _mte
84

9-
__all__ = ['sum', 'sub', 'mul', 'div', 'MathValueError', 'exp', 'sqrt', 'log', 'reciprocal', 'factorial', 'calc_pi', 'calc_e', 'MathTypeError', 'fdiv', 'fmul', 'fexp']
5+
__all__ = ['sum', 'sub', 'mul', 'div', 'MathValueError', 'exp', 'sqrt', 'log', 'reciprocal', 'factorial', 'calc_pi', 'calc_e', 'MathTypeError']
106

11-
class MathBaseError(_mbe):
7+
class MathTypeError(_mte):
128
"""
13-
Exception Class for Math Base Errors.
9+
Exception Class for Math Type Errors.
1410
"""
1511
def __init__(self, *args: object):
1612
"""
@@ -20,8 +16,6 @@ def __init__(self, *args: object):
2016
self.args_str = str(args)
2117
super().__init__(*args)
2218

23-
__all__.append('MathBaseError')
24-
2519
class MathValueError(_mve):
2620
"""
2721
Exception Class for Math Value Errors.

highpymath/exceptions.py

-13
This file was deleted.

highpymath/fast.py

-82
This file was deleted.

src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use pyo3::prelude::*;
22
use pyo3::exceptions::PyException;
33
use pyo3::create_exception;
44

5-
create_exception!(highpymath, MathBaseError, PyException);
6-
create_exception!(highpymath, MathValueError, MathBaseError);
5+
create_exception!(highpymath, MathTypeError, PyException);
6+
create_exception!(highpymath, MathValueError, PyException);
77
create_exception!(highpymath, GeometryError, MathValueError);
88

99
#[cfg(target_pointer_width = "32")]
@@ -313,8 +313,8 @@ fn highpymath(m: &PyModule) -> PyResult<()> {
313313
m.add_function(wrap_pyfunction!(quadratic_circumference, m)?)?;
314314
m.add_function(wrap_pyfunction!(circle_area, m)?)?;
315315
m.add_function(wrap_pyfunction!(circle_circumference, m)?)?;
316-
m.add("MathValueError", m.py().get_type::<MathValueError>())?;
317-
m.add("MathBaseError", m.py().get_type::<MathBaseError>())?;
316+
m.add("MathTypeError", m.py().get_type::<MathTypeError>())?;
317+
m.add("MathValueError", m.py().get_type::<MathValueError>())?;
318318
m.add("GeometryError", m.py().get_type::<GeometryError>())?;
319319
Ok(())
320320
}

0 commit comments

Comments
 (0)