##// END OF EJS Templates
Explicit ruff ignoring of existing issues.
M Bussonnier -
Show More
@@ -1,392 +1,410
1 1 [build-system]
2 2 requires = ["setuptools>=61.2"]
3 3 # We need access to the 'setupbase' module at build time.
4 4 # Hence we declare a custom build backend.
5 5 build-backend = "_build_meta" # just re-exports setuptools.build_meta definitions
6 6 backend-path = ["."]
7 7
8 8 [project]
9 9 name = "ipython"
10 10 description = "IPython: Productive Interactive Computing"
11 11 keywords = ["Interactive", "Interpreter", "Shell", "Embedding"]
12 12 classifiers = [
13 13 "Framework :: IPython",
14 14 "Framework :: Jupyter",
15 15 "Intended Audience :: Developers",
16 16 "Intended Audience :: Science/Research",
17 17 "License :: OSI Approved :: BSD License",
18 18 "Programming Language :: Python",
19 19 "Programming Language :: Python :: 3",
20 20 "Programming Language :: Python :: 3 :: Only",
21 21 "Topic :: System :: Shells",
22 22 ]
23 23 requires-python = ">=3.11"
24 24 dependencies = [
25 25 'colorama; sys_platform == "win32"',
26 26 "decorator",
27 27 "jedi>=0.16",
28 28 "matplotlib-inline",
29 29 'pexpect>4.3; sys_platform != "win32" and sys_platform != "emscripten"',
30 30 "prompt_toolkit>=3.0.41,<3.1.0",
31 31 "pygments>=2.4.0",
32 32 "stack_data",
33 33 "traitlets>=5.13.0",
34 34 "typing_extensions>=4.6; python_version<'3.12'",
35 35 ]
36 36 dynamic = ["authors", "license", "version"]
37 37
38 38 [project.entry-points."pygments.lexers"]
39 39 ipythonconsole = "IPython.lib.lexers:IPythonConsoleLexer"
40 40 ipython = "IPython.lib.lexers:IPythonLexer"
41 41 ipython3 = "IPython.lib.lexers:IPython3Lexer"
42 42
43 43 [project.scripts]
44 44 ipython = "IPython:start_ipython"
45 45 ipython3 = "IPython:start_ipython"
46 46
47 47 [project.readme]
48 48 file = "long_description.rst"
49 49 content-type = "text/x-rst"
50 50
51 51 [project.urls]
52 52 Homepage = "https://ipython.org"
53 53 Documentation = "https://ipython.readthedocs.io/"
54 54 Funding = "https://numfocus.org/"
55 55 Source = "https://github.com/ipython/ipython"
56 56 Tracker = "https://github.com/ipython/ipython/issues"
57 57
58 58 [project.optional-dependencies]
59 59 black = ["black"]
60 60 doc = [
61 61 "docrepr",
62 62 "exceptiongroup",
63 63 "intersphinx_registry",
64 64 "ipykernel",
65 65 "ipython[test]",
66 66 "matplotlib",
67 67 "setuptools>=18.5",
68 68 "sphinx-rtd-theme",
69 69 "sphinx>=1.3",
70 70 "sphinxcontrib-jquery",
71 71 ]
72 72 kernel = ["ipykernel"]
73 73 nbconvert = ["nbconvert"]
74 74 nbformat = ["nbformat"]
75 75 notebook = ["ipywidgets", "notebook"]
76 76 parallel = ["ipyparallel"]
77 77 qtconsole = ["qtconsole"]
78 78 terminal = []
79 79 test = ["pytest", "pytest-asyncio<0.22", "testpath", "pickleshare", "packaging"]
80 80 test_extra = [
81 81 "ipython[test]",
82 82 "curio",
83 83 "matplotlib!=3.2.0",
84 84 "nbformat",
85 85 "numpy>=1.23",
86 86 "pandas",
87 87 "trio",
88 88 ]
89 89 matplotlib = ["matplotlib"]
90 90 all = [
91 91 "ipython[black,doc,kernel,nbconvert,nbformat,notebook,parallel,qtconsole,matplotlib]",
92 92 "ipython[test,test_extra]",
93 93 ]
94 94
95 95 [tool.mypy]
96 96 python_version = "3.10"
97 97 ignore_missing_imports = true
98 98 follow_imports = 'silent'
99 99 exclude = [
100 100 'test_\.+\.py',
101 101 'IPython.utils.tests.test_wildcard',
102 102 'testing',
103 103 'tests',
104 104 'PyColorize.py',
105 105 '_process_win32_controller.py',
106 106 'IPython/core/application.py',
107 107 'IPython/core/profileapp.py',
108 108 'IPython/lib/deepreload.py',
109 109 'IPython/sphinxext/ipython_directive.py',
110 110 'IPython/terminal/ipapp.py',
111 111 'IPython/utils/path.py',
112 112 ]
113 113 # check_untyped_defs = true
114 114 # disallow_untyped_calls = true
115 115 # disallow_untyped_decorators = true
116 116 # ignore_errors = false
117 117 # ignore_missing_imports = false
118 118 disallow_incomplete_defs = true
119 119 disallow_untyped_defs = true
120 120 warn_redundant_casts = true
121 121
122 122 [[tool.mypy.overrides]]
123 123 module = ["IPython.core.crashhandler"]
124 124 check_untyped_defs = true
125 125 disallow_incomplete_defs = true
126 126 disallow_untyped_calls = true
127 127 disallow_untyped_decorators = true
128 128 disallow_untyped_defs = true
129 129 ignore_errors = false
130 130 ignore_missing_imports = false
131 131
132 132 [[tool.mypy.overrides]]
133 133 module = ["IPython.utils.text"]
134 134 disallow_untyped_defs = true
135 135 check_untyped_defs = false
136 136 disallow_untyped_decorators = true
137 137
138 138 [[tool.mypy.overrides]]
139 139 module = []
140 140 disallow_untyped_defs = false
141 141 ignore_errors = true
142 142 ignore_missing_imports = true
143 143 disallow_untyped_calls = false
144 144 disallow_incomplete_defs = false
145 145 check_untyped_defs = false
146 146 disallow_untyped_decorators = false
147 147
148 148
149 149 # gloabl ignore error
150 150 [[tool.mypy.overrides]]
151 151 module = [
152 152 "IPython",
153 153 "IPython.conftest",
154 154 "IPython.core.alias",
155 155 "IPython.core.async_helpers",
156 156 "IPython.core.autocall",
157 157 "IPython.core.builtin_trap",
158 158 "IPython.core.compilerop",
159 159 "IPython.core.completer",
160 160 "IPython.core.completerlib",
161 161 "IPython.core.debugger",
162 162 "IPython.core.display",
163 163 "IPython.core.display_functions",
164 164 "IPython.core.display_trap",
165 165 "IPython.core.displayhook",
166 166 "IPython.core.displaypub",
167 167 "IPython.core.events",
168 168 "IPython.core.excolors",
169 169 "IPython.core.extensions",
170 170 "IPython.core.formatters",
171 171 "IPython.core.getipython",
172 172 "IPython.core.guarded_eval",
173 173 "IPython.core.historyapp",
174 174 "IPython.core.hooks",
175 175 "IPython.core.inputtransformer",
176 176 "IPython.core.inputtransformer2",
177 177 "IPython.core.interactiveshell",
178 178 "IPython.core.logger",
179 179 "IPython.core.macro",
180 180 "IPython.core.magic",
181 181 "IPython.core.magic_arguments",
182 182 "IPython.core.magics.ast_mod",
183 183 "IPython.core.magics.auto",
184 184 "IPython.core.magics.basic",
185 185 "IPython.core.magics.code",
186 186 "IPython.core.magics.config",
187 187 "IPython.core.magics.display",
188 188 "IPython.core.magics.execution",
189 189 "IPython.core.magics.extension",
190 190 "IPython.core.magics.history",
191 191 "IPython.core.magics.logging",
192 192 "IPython.core.magics.namespace",
193 193 "IPython.core.magics.osm",
194 194 "IPython.core.magics.packaging",
195 195 "IPython.core.magics.pylab",
196 196 "IPython.core.magics.script",
197 197 "IPython.core.oinspect",
198 198 "IPython.core.page",
199 199 "IPython.core.payload",
200 200 "IPython.core.payloadpage",
201 201 "IPython.core.prefilter",
202 202 "IPython.core.profiledir",
203 203 "IPython.core.prompts",
204 204 "IPython.core.pylabtools",
205 205 "IPython.core.shellapp",
206 206 "IPython.core.splitinput",
207 207 "IPython.core.ultratb",
208 208 "IPython.extensions.autoreload",
209 209 "IPython.extensions.storemagic",
210 210 "IPython.external.qt_for_kernel",
211 211 "IPython.external.qt_loaders",
212 212 "IPython.lib.backgroundjobs",
213 213 "IPython.lib.clipboard",
214 214 "IPython.lib.demo",
215 215 "IPython.lib.display",
216 216 "IPython.lib.editorhooks",
217 217 "IPython.lib.guisupport",
218 218 "IPython.lib.latextools",
219 219 "IPython.lib.lexers",
220 220 "IPython.lib.pretty",
221 221 "IPython.paths",
222 222 "IPython.sphinxext.ipython_console_highlighting",
223 223 "IPython.terminal.debugger",
224 224 "IPython.terminal.embed",
225 225 "IPython.terminal.interactiveshell",
226 226 "IPython.terminal.magics",
227 227 "IPython.terminal.prompts",
228 228 "IPython.terminal.pt_inputhooks",
229 229 "IPython.terminal.pt_inputhooks.asyncio",
230 230 "IPython.terminal.pt_inputhooks.glut",
231 231 "IPython.terminal.pt_inputhooks.gtk",
232 232 "IPython.terminal.pt_inputhooks.gtk3",
233 233 "IPython.terminal.pt_inputhooks.gtk4",
234 234 "IPython.terminal.pt_inputhooks.osx",
235 235 "IPython.terminal.pt_inputhooks.pyglet",
236 236 "IPython.terminal.pt_inputhooks.qt",
237 237 "IPython.terminal.pt_inputhooks.tk",
238 238 "IPython.terminal.pt_inputhooks.wx",
239 239 "IPython.terminal.ptutils",
240 240 "IPython.terminal.shortcuts",
241 241 "IPython.terminal.shortcuts.auto_match",
242 242 "IPython.terminal.shortcuts.auto_suggest",
243 243 "IPython.terminal.shortcuts.filters",
244 244 "IPython.utils._process_cli",
245 245 "IPython.utils._process_common",
246 246 "IPython.utils._process_emscripten",
247 247 "IPython.utils._process_posix",
248 248 "IPython.utils.capture",
249 249 "IPython.utils.coloransi",
250 250 "IPython.utils.contexts",
251 251 "IPython.utils.data",
252 252 "IPython.utils.decorators",
253 253 "IPython.utils.dir2",
254 254 "IPython.utils.encoding",
255 255 "IPython.utils.frame",
256 256 "IPython.utils.generics",
257 257 "IPython.utils.importstring",
258 258 "IPython.utils.io",
259 259 "IPython.utils.ipstruct",
260 260 "IPython.utils.module_paths",
261 261 "IPython.utils.openpy",
262 262 "IPython.utils.process",
263 263 "IPython.utils.py3compat",
264 264 "IPython.utils.sentinel",
265 265 "IPython.utils.strdispatch",
266 266 "IPython.utils.sysinfo",
267 267 "IPython.utils.syspathcontext",
268 268 "IPython.utils.tempdir",
269 269 "IPython.utils.terminal",
270 270 "IPython.utils.timing",
271 271 "IPython.utils.tokenutil",
272 272 "IPython.utils.version",
273 273 "IPython.utils.wildcard",
274 274
275 275 ]
276 276 disallow_untyped_defs = false
277 277 ignore_errors = true
278 278 ignore_missing_imports = true
279 279 disallow_untyped_calls = false
280 280 disallow_incomplete_defs = false
281 281 check_untyped_defs = false
282 282 disallow_untyped_decorators = false
283 283
284 284 [tool.pytest.ini_options]
285 285 addopts = [
286 286 "--durations=10",
287 287 "-pIPython.testing.plugin.pytest_ipdoctest",
288 288 "--ipdoctest-modules",
289 289 "--ignore=docs",
290 290 "--ignore=examples",
291 291 "--ignore=htmlcov",
292 292 "--ignore=ipython_kernel",
293 293 "--ignore=ipython_parallel",
294 294 "--ignore=results",
295 295 "--ignore=tmp",
296 296 "--ignore=tools",
297 297 "--ignore=traitlets",
298 298 "--ignore=IPython/core/tests/daft_extension",
299 299 "--ignore=IPython/sphinxext",
300 300 "--ignore=IPython/terminal/pt_inputhooks",
301 301 "--ignore=IPython/__main__.py",
302 302 "--ignore=IPython/external/qt_for_kernel.py",
303 303 "--ignore=IPython/html/widgets/widget_link.py",
304 304 "--ignore=IPython/html/widgets/widget_output.py",
305 305 "--ignore=IPython/terminal/console.py",
306 306 "--ignore=IPython/utils/_process_cli.py",
307 307 "--ignore=IPython/utils/_process_posix.py",
308 308 "--ignore=IPython/utils/_process_win32_controller.py",
309 309 "--ignore=IPython/utils/daemonize.py",
310 310 "--ignore=IPython/utils/eventful.py",
311 311 "--ignore=IPython/kernel",
312 312 "--ignore=IPython/consoleapp.py",
313 313 "--ignore=IPython/lib/kernel.py",
314 314 "--ignore=IPython/utils/jsonutil.py",
315 315 "--ignore=IPython/utils/localinterfaces.py",
316 316 "--ignore=IPython/utils/log.py",
317 317 "--ignore=IPython/utils/signatures.py",
318 318 "--ignore=IPython/utils/version.py",
319 319 ]
320 320 doctest_optionflags = ["NORMALIZE_WHITESPACE", "ELLIPSIS"]
321 321 ipdoctest_optionflags = ["NORMALIZE_WHITESPACE", "ELLIPSIS"]
322 322 asyncio_mode = "strict"
323 323
324 324 [tool.pyright]
325 325 pythonPlatform = "All"
326 326
327 327 [tool.setuptools]
328 328 zip-safe = false
329 329 platforms = ["Linux", "Mac OSX", "Windows"]
330 330 license-files = ["LICENSE"]
331 331 include-package-data = false
332 332
333 333 [tool.setuptools.packages.find]
334 334 exclude = ["setupext"]
335 335 namespaces = false
336 336
337 337 [tool.setuptools.package-data]
338 338 "IPython" = ["py.typed"]
339 339 "IPython.core" = ["profile/README*"]
340 340 "IPython.core.tests" = ["*.png", "*.jpg", "daft_extension/*.py"]
341 341 "IPython.lib.tests" = ["*.wav"]
342 342 "IPython.testing.plugin" = ["*.txt"]
343 343
344 344 [tool.setuptools.dynamic]
345 345 version = { attr = "IPython.core.release.__version__" }
346 346
347 347 [tool.coverage.run]
348 348 omit = [
349 349 # omit everything in /tmp as we run tempfile
350 350 "/tmp/*",
351 351 ]
352 352
353 353 [tool.ruff.lint]
354 354 extend-select = [
355 355 # "B", # flake8-bugbear
356 356 # "I", # isort
357 357 # that will be a problem for pytest fixture unless you swap with the usefixture decorator https://docs.pytest.org/en/7.1.x/how-to/fixtures.html#use-fixtures-in-classes-and-modules-with-usefixtures
358 358 # "ARG", # flake8-unused-arguments
359 359 # "C4", # flake8-comprehensions
360 360 # "EM", # flake8-errmsg
361 361 # "ICN", # flake8-import-conventions
362 362 # "G", # flake8-logging-format
363 363 # "PGH", # pygrep-hooks
364 364 # "PIE", # flake8-pie
365 365 # "PL", # pylint
366 366 # "PTH", # flake8-use-pathlib
367 367 # "PT", # flake8-pytest-style
368 368 # "RET", # flake8-return
369 369 # "RUF", # Ruff-specific
370 370 # "SIM", # flake8-simplify
371 371 # "T20", # flake8-print
372 372 # "UP", # pyupgrade
373 373 # "YTT", # flake8-2020
374 374 # "EXE", # flake8-executable
375 375 # "PYI", # flake8-pyi
376 376 # "S", # flake8-bandit
377 377 ]
378 378 ignore = [
379 379 # "E501", # E501 Line too long (158 > 100 characters)
380 380 # "SIM105", # SIM105 Use `contextlib.suppress(...)`
381 381 # "PLR", # Design related pylint codes
382 382 # "S101", # Use of `assert` detected
383 "E712", # 1
384 "E713", # 1
385 "E902", # 2
386 "E702", # 3
387 "E721", # 3
388 "E401", # 5
389 "E711", # 14 Comparison to `None` should be `cond is None`
390 "E701", # 19 Multiple statements on one line (colon)
391 "E741", # 25 Ambiguous variable name: `<one letter>`
392 "E731", # 27 Do not assign a `lambda` expression, use a `def`
393 "E402", # 28 Module level import not at top of file
394 "E722", # 75 Do not use bare `except`
395 "F523", # 1
396 "F811", # 3
397 "F403", # 7
398 "F841", # 38 Local variable `...` is assigned to but never used
399 "F401", # 69 imported but unused
400 "F821", # 624 F821 Undefined name
383 401 ]
384 402 unfixable = [
385 403 # Don't touch print statements
386 404 "T201",
387 405 # Don't touch noqa lines
388 406 "RUF100",
389 407 ]
390 408
391 409 [tool.ruff]
392 410 extend-exclude = ["tests"]
General Comments 0
You need to be logged in to leave comments. Login now