##// END OF EJS Templates
try ruff to find unused imports
Matthias Bussonnier -
Show More
@@ -18,7 +18,6 b' https://ipython.org'
18 18 # Imports
19 19 #-----------------------------------------------------------------------------
20 20
21 import os
22 21 import sys
23 22
24 23 #-----------------------------------------------------------------------------
@@ -14,7 +14,6 b' object and then create the configurable objects, passing the config to them.'
14 14
15 15 import atexit
16 16 from copy import deepcopy
17 import glob
18 17 import logging
19 18 import os
20 19 import shutil
@@ -19,7 +19,6 b' Authors:'
19 19 # Imports
20 20 #-----------------------------------------------------------------------------
21 21
22 import os
23 22 import sys
24 23 import traceback
25 24 from pprint import pformat
@@ -104,7 +104,6 b' All the changes since then are under the same license as IPython.'
104 104 import inspect
105 105 import linecache
106 106 import sys
107 import warnings
108 107 import re
109 108 import os
110 109
@@ -4,7 +4,6 b' Color schemes for exception handling code in IPython.'
4 4 """
5 5
6 6 import os
7 import warnings
8 7
9 8 #*****************************************************************************
10 9 # Copyright (C) 2005-2006 Fernando Perez <fperez@colorado.edu>
@@ -11,7 +11,6 b' Inheritance diagram:'
11 11 # Distributed under the terms of the Modified BSD License.
12 12
13 13 import abc
14 import json
15 14 import sys
16 15 import traceback
17 16 import warnings
@@ -11,7 +11,6 b' deprecated in 7.0.'
11 11 # Distributed under the terms of the Modified BSD License.
12 12
13 13 import ast
14 import sys
15 14 from codeop import CommandCompiler, Compile
16 15 import re
17 16 import tokenize
@@ -1,7 +1,6 b''
1 1 """Implementation of basic magic functions."""
2 2
3 3
4 import argparse
5 4 from logging import error
6 5 import io
7 6 import os
@@ -31,7 +31,6 b' from IPython.lib.pretty import pretty'
31 31 from IPython.testing.skipdoctest import skip_doctest
32 32 from IPython.utils import PyColorize
33 33 from IPython.utils import openpy
34 from IPython.utils import py3compat
35 34 from IPython.utils.dir2 import safe_hasattr
36 35 from IPython.utils.path import compress_user
37 36 from IPython.utils.text import indent
@@ -19,7 +19,6 b' from IPython.core.application import SYSTEM_CONFIG_DIRS, ENV_CONFIG_DIRS'
19 19 from IPython.core import pylabtools
20 20 from IPython.utils.contexts import preserve_keys
21 21 from IPython.utils.path import filefind
22 import traitlets
23 22 from traitlets import (
24 23 Unicode, Instance, List, Bool, CaselessStrEnum, observe,
25 24 DottedObjectName,
@@ -17,9 +17,6 b''
17 17 import linecache
18 18 import sys
19 19
20 # Third-party imports
21 import pytest
22
23 20 # Our own imports
24 21 from IPython.core import compilerop
25 22
@@ -4,7 +4,6 b''
4 4 # Copyright (c) IPython Development Team.
5 5 # Distributed under the terms of the Modified BSD License.
6 6
7 import bdb
8 7 import builtins
9 8 import os
10 9 import sys
@@ -1,6 +1,5 b''
1 1 """Tests for the Formatters."""
2 2
3 import warnings
4 3 from math import pi
5 4
6 5 try:
@@ -7,7 +7,6 b''
7 7
8 8 # stdlib
9 9 import io
10 import sqlite3
11 10 import sys
12 11 import tempfile
13 12 from datetime import datetime
@@ -3,7 +3,6 b''
3 3 Line-based transformers are the simpler ones; token-based transformers are
4 4 more complex. See test_inputtransformer2 for tests for token-based transformers.
5 5 """
6 import pytest
7 6
8 7 from IPython.core import inputtransformer2 as ipt2
9 8
@@ -4,8 +4,6 b''
4 4 # Module imports
5 5 #-----------------------------------------------------------------------------
6 6
7 # third party
8 import pytest
9 7
10 8 # our own packages
11 9
@@ -1,7 +1,6 b''
1 1 # -*- coding: utf-8 -*-
2 2 """Tests for various magic functions."""
3 3
4 import asyncio
5 4 import gc
6 5 import io
7 6 import os
@@ -1,7 +1,6 b''
1 1 import errno
2 2 import os
3 3 import shutil
4 import sys
5 4 import tempfile
6 5 import warnings
7 6 from unittest.mock import patch
@@ -155,9 +155,6 b' def test_import_pylab():'
155 155 assert ns["np"] == np
156 156
157 157
158 from traitlets.config import Config
159
160
161 158 class TestPylabSwitch(object):
162 159 class Shell(InteractiveShell):
163 160 def init_history(self):
@@ -2,7 +2,6 b''
2 2 """Tests for IPython.core.ultratb
3 3 """
4 4 import io
5 import logging
6 5 import os.path
7 6 import platform
8 7 import re
@@ -12,7 +12,7 b' import subprocess'
12 12 from base64 import encodebytes
13 13 import textwrap
14 14
15 from pathlib import Path, PurePath
15 from pathlib import Path
16 16
17 17 from IPython.utils.process import find_cmd, FindCmdError
18 18 from traitlets.config import get_config
@@ -1,7 +1,6 b''
1 1 """Find files and directories which IPython uses.
2 2 """
3 3 import os.path
4 import shutil
5 4 import tempfile
6 5 from warnings import warn
7 6
@@ -36,7 +36,6 b' import shutil'
36 36 import sys
37 37 import tempfile
38 38 import unittest
39 import warnings
40 39 from importlib import import_module
41 40
42 41 from decorator import decorator
@@ -12,7 +12,6 b' done.'
12 12 import builtins as builtin_mod
13 13 import sys
14 14 import types
15 import warnings
16 15
17 16 from pathlib import Path
18 17
@@ -21,7 +21,6 b' Limitations:'
21 21 # From the standard library
22 22 import doctest
23 23 import logging
24 import os
25 24 import re
26 25
27 26 from testpath import modified_env
@@ -9,7 +9,6 b' import sys'
9 9 import os
10 10 import string
11 11 import subprocess
12 import time
13 12
14 13
15 14 def test_cve_2022_21699():
@@ -12,7 +12,6 b' import atexit'
12 12 import os
13 13 import sys
14 14 import tempfile
15 import warnings
16 15 from pathlib import Path
17 16 from warnings import warn
18 17
@@ -17,7 +17,6 b' Utility functions for finding modules on sys.path.'
17 17
18 18 # Stdlib imports
19 19 import importlib
20 import os
21 20 import sys
22 21
23 22 # Third-party imports
@@ -12,10 +12,8 b' import errno'
12 12 import shutil
13 13 import random
14 14 import glob
15 from warnings import warn
16 15
17 16 from IPython.utils.process import system
18 from IPython.utils.decorators import undoc
19 17
20 18 #-----------------------------------------------------------------------------
21 19 # Code
@@ -8,7 +8,6 b''
8 8 import sys
9 9 from io import StringIO
10 10
11 from subprocess import Popen, PIPE
12 11 import unittest
13 12
14 13 from IPython.utils.io import Tee, capture_output
@@ -18,8 +18,6 b' import tempfile'
18 18
19 19 from pathlib import Path
20 20
21 from IPython.testing.tools import make_tempfile
22
23 21 import IPython.utils.module_paths as mp
24 22
25 23 TEST_FILE_PATH = Path(__file__).resolve().parent
@@ -15,7 +15,6 b''
15 15 import os
16 16 import math
17 17 import random
18 import sys
19 18
20 19 from pathlib import Path
21 20
General Comments 0
You need to be logged in to leave comments. Login now