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

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

9 statements  

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 

6 

7class Sentinel: 

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 def __repr__(self): 

15 return str(self.module) + "." + self.name