Skip to content

Commit ab7c049

Browse files
committed
[seabreeze] add comments about importing exceptions from backends
Add a comment to prevent direct import from backends. It's not worth protecting against this by overcomplicating things. Close #101.
1 parent 08fe721 commit ab7c049

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/seabreeze/cseabreeze/c_seabreeze_wrapper.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ DEF _MAXBUFLEN = 32
3535
DEF _MAXDBUFLEN = 256
3636

3737

38+
# DO NOT DIRECTLY IMPORT EXCEPTIONS FROM HERE!
39+
# ALWAYS IMPORT FROM `seabreeze.spectrometers`
3840
class SeaBreezeError(Exception):
3941

4042
_error_msgs = (

src/seabreeze/pyseabreeze/exceptions.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
"""custom seabreeze exceptions
2-
3-
"""
1+
"""custom seabreeze exceptions"""
2+
# DO NOT DIRECTLY IMPORT EXCEPTIONS FROM HERE!
3+
# ALWAYS IMPORT FROM `seabreeze.spectrometers`
44

55

66
class SeaBreezeError(Exception):
77
"""SeaBreezeError base class"""
8-
98
pass
109

1110

0 commit comments

Comments
 (0)