Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/IPython/core/error.py: 100%

7 statements  

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

1# encoding: utf-8 

2""" 

3Global exception classes for IPython.core. 

4 

5Authors: 

6 

7* Brian Granger 

8* Fernando Perez 

9* Min Ragan-Kelley 

10 

11Notes 

12----- 

13""" 

14 

15#----------------------------------------------------------------------------- 

16# Copyright (C) 2008 The IPython Development Team 

17# 

18# Distributed under the terms of the BSD License. The full license is in 

19# the file COPYING, distributed as part of this software. 

20#----------------------------------------------------------------------------- 

21 

22#----------------------------------------------------------------------------- 

23# Imports 

24#----------------------------------------------------------------------------- 

25 

26#----------------------------------------------------------------------------- 

27# Exception classes 

28#----------------------------------------------------------------------------- 

29 

30class IPythonCoreError(Exception): 

31 pass 

32 

33 

34class TryNext(IPythonCoreError): 

35 """Try next hook exception. 

36 

37 Raise this in your hook function to indicate that the next hook handler 

38 should be used to handle the operation. 

39 """ 

40 

41class UsageError(IPythonCoreError): 

42 """Error in magic function arguments, etc. 

43 

44 Something that probably won't warrant a full traceback, but should 

45 nevertheless interrupt a macro / batch file. 

46 """ 

47 

48class StdinNotImplementedError(IPythonCoreError, NotImplementedError): 

49 """raw_input was requested in a context where it is not supported 

50 

51 For use in IPython kernels, where only some frontends may support 

52 stdin requests. 

53 """ 

54 

55class InputRejected(Exception): 

56 """Input rejected by ast transformer. 

57 

58 Raise this in your NodeTransformer to indicate that InteractiveShell should 

59 not execute the supplied input. 

60 """