Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/IPython/utils/sentinel.py: 88%

8 statements  

« prev     ^ index     » next       coverage.py v7.4.4, created at 2024-04-20 06:09 +0000

1"""Sentinel class for constants with useful reprs""" 

2 

3# Copyright (c) IPython Development Team. 

4# Distributed under the terms of the Modified BSD License. 

5 

6class Sentinel(object): 

7 

8 def __init__(self, name, module, docstring=None): 

9 self.name = name 

10 self.module = module 

11 if docstring: 

12 self.__doc__ = docstring 

13 

14 

15 def __repr__(self): 

16 return str(self.module)+'.'+self.name 

17