HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Users/fred/anaconda3/pkgs/ipykernel-6.28.0-py312haa95532_0/info/test/pyproject.toml
[build-system]
requires = ["hatchling>=1.4", "jupyter_client>=6"]
build-backend = "hatchling.build"

[project]
name = "ipykernel"
dynamic = ["version"]
authors = [{name = "IPython Development Team", email = "[email protected]"}]
license = {file = "LICENSE"}
readme = "README.md"
description = "IPython Kernel for Jupyter"
keywords = ["Interactive", "Interpreter", "Shell", "Web"]
classifiers = [
    "Intended Audience :: Developers",
    "Intended Audience :: System Administrators",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: BSD License",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3",
]
urls = {Homepage = "https://ipython.org"}
requires-python = ">=3.8"
dependencies = [
    "debugpy>=1.6.5",
    "ipython>=7.23.1",
    "comm>=0.1.1",
    "traitlets>=5.4.0",
    "jupyter_client>=6.1.12",
    "jupyter_core>=4.12,!=5.0.*",
    # For tk event loop support only.
    "nest_asyncio",
    "tornado>=6.1",
    "matplotlib-inline>=0.1",
    'appnope;platform_system=="Darwin"',
    "pyzmq>=24",
    "psutil",
    "packaging",
]

[project.optional-dependencies]
docs = [
  "sphinx",
  "myst_parser",
  "pydata_sphinx_theme",
  "sphinxcontrib_github_alt",
  "sphinxcontrib-spelling",
  "sphinx-autodoc-typehints",
  "trio"
]
test = [
    "pytest>=7.0",
    "pytest-cov",
    "flaky",
    "ipyparallel",
    "pre-commit",
    "pytest-asyncio",
    "pytest-timeout"
]
cov = [
  "coverage[toml]",
  "pytest-cov",
  "matplotlib",
  "curio",
  "trio",
]
pyqt5 = ["pyqt5"]
pyside6 = ["pyside6"]

[tool.hatch.version]
path = "ipykernel/_version.py"

# Used to call hatch_build.py
[tool.hatch.build.hooks.custom]

[tool.hatch.build.targets.wheel.shared-data]
"data_kernelspec" = "share/jupyter/kernels/python3"

[tool.hatch.build.force-include]
"./ipykernel_launcher.py" = "ipykernel_launcher.py"

[tool.hatch.envs.docs]
features = ["docs"]
[tool.hatch.envs.docs.scripts]
build = "make -C docs html SPHINXOPTS='-W'"
api = "sphinx-apidoc -o docs/api -f -E ipykernel tests ipykernel/datapub.py ipykernel/pickleutil.py ipykernel/serialize.py ipykernel/gui ipykernel/pylab"

[tool.hatch.envs.test]
features = ["test"]
[tool.hatch.envs.test.scripts]
list = "python -m pip freeze"
test = "python -m pytest -vv {args}"
nowarn = "test -W default {args}"

[tool.hatch.envs.cov]
features = ["test", "cov"]
[tool.hatch.envs.cov.scripts]
test = "python -m pytest -vv --cov ipykernel --cov-branch --cov-report term-missing:skip-covered {args}"
nowarn = "test -W default {args}"

[[tool.hatch.envs.cov.matrix]]
qt = ["qt5", "qt6"]

[tool.hatch.envs.cov.overrides]
matrix.qt.features = [
  { value = "pyqt5", if = ["qt5"] },
  { value = "pyside6", if = ["qt6"] },
]

[tool.hatch.envs.typing]
dependencies = ["pre-commit"]
detached = true
[tool.hatch.envs.typing.scripts]
test = "pre-commit run --all-files --hook-stage manual mypy"

[tool.hatch.envs.lint]
dependencies = ["pre-commit"]
detached = true
[tool.hatch.envs.lint.scripts]
build = [
  "pre-commit run --all-files ruff",
  "pre-commit run --all-files ruff-format"
]

[tool.mypy]
files = "ipykernel"
strict = true
disable_error_code = ["no-untyped-def", "no-untyped-call", "import-not-found"]
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
follow_imports = "normal"
pretty = true
warn_unreachable = true

[tool.pytest.ini_options]
minversion = "6.0"
xfail_strict = true
log_cli_level = "info"
addopts = [
  "-raXs", "--durations=10", "--color=yes", "--doctest-modules",
   "--showlocals", "--strict-markers", "--strict-config",
   "--ignore=ipykernel/pylab/backend_inline.py",
   "--ignore=ipykernel/pylab/config.py",
   "--ignore=ipykernel/gui/gtk3embed.py",
   "--ignore=ipykernel/gui/gtkembed.py",
   "--ignore=ipykernel/datapub.py",
   "--ignore=ipykernel/log.py",
   "--ignore=ipykernel/pickleutil.py",
   "--ignore=ipykernel/serialize.py",
   "--ignore=ipykernel/_eventloop_macos.py"
]
testpaths = [
    "tests",
    "tests/inprocess"
]
asyncio_mode = "auto"
timeout = 300
# Restore this setting to debug failures
#timeout_method = "thread"
filterwarnings= [
  # Fail on warnings
  "error",

  # Ignore our own warnings
  "ignore:The `stream` parameter of `getpass.getpass` will have no effect:UserWarning",
  "ignore:has moved to ipyparallel:DeprecationWarning",

  # IPython warnings
  "ignore: `Completer.complete` is pending deprecation since IPython 6.0 and will be replaced by `Completer.completions`:PendingDeprecationWarning",

  # Ignore jupyter_client warnings
  "ignore:unclosed <socket.socket:ResourceWarning",
  "ignore:unclosed event loop:ResourceWarning",
  "ignore:There is no current event loop:DeprecationWarning",
  "module:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning",

  # Ignore datetime warning.
  "ignore:datetime.datetime.utc:DeprecationWarning",

  # Ignore distutils deprecation warning from appnope
  "ignore:distutils Version classes are deprecated. Use packaging.version instead.",
]

[tool.coverage.report]
exclude_lines = [
  "pragma: no cover",
  "def __repr__",
  "if self.debug:",
  "if settings.DEBUG",
  "raise AssertionError",
  "raise NotImplementedError",
  "if 0:",
  "if __name__ == .__main__.:",
  "class .*\bProtocol\\):",
  "@(abc\\.)?abstractmethod",
]

[tool.coverage.run]
relative_files = true
source = ["ipykernel"]
omit = [
  "tests/*",
  "ipykernel/datapub.py",
  "ipykernel/debugger.py",
  "ipykernel/eventloops.py",
  "ipykernel/log.py",
  "ipykernel/pickleutil.py",
  "ipykernel/serialize.py",
  "ipykernel/gui/*",
  "ipykernel/pylab/*",
]

[tool.ruff]
line-length = 100

[tool.ruff.lint]
select = [
  "B",           # flake8-bugbear
  "I",           # isort
  "ARG",         # flake8-unused-arguments
  "C4",          # flake8-comprehensions
  "EM",          # flake8-errmsg
  "ICN",         # flake8-import-conventions
  "G",           # flake8-logging-format
  "PGH",         # pygrep-hooks
  "PIE",         # flake8-pie
  "PL",          # pylint
  "PT",          # flake8-pytest-style
  "PTH",         # flake8-use-pathlib
  "RET",         # flake8-return
  "RUF",         # Ruff-specific
  "SIM",         # flake8-simplify
  "T20",         # flake8-print
  "UP",          # pyupgrade
  "YTT",         # flake8-2020
  "EXE",         # flake8-executable
  "NPY",         # NumPy specific rules
  "PD",          # pandas-vet
  "PYI",         # flake8-pyi
]
ignore = [
  "PLR",    # Design related pylint codes
  # Allow non-abstract empty methods in abstract base classes
  "B027",
  # Use of `assert` detected
  "S101",
  # Possible hardcoded password
  "S105", "S106",
  # `print` found
  "T201",
  # Unnecessary `dict` call (rewrite as a literal)
  "C408",
  # Use `contextlib.suppress(ValueError)` instead of try-except-pass
  "SIM105",
  # `try`-`except`-`pass` detected
  "S110",
  # Mutable class attributes should be annotated with `typing.ClassVar`
  "RUF012",
  # Unused function argument:
  "ARG001",
  # Unused method argument:
  "ARG002",
  # Logging statement uses `%`
  "G002",
  # `open()` should be replaced by `Path.open()`
  "PTH123",
]
unfixable = [
  # Don't touch print statements
  "T201",
  # Don't touch noqa lines
  "RUF100",
]

[tool.ruff.lint.per-file-ignores]
# B011 Do not call assert False since python -O removes these calls
# C408 Unnecessary `dict` call
# T201 `print` found
# B007 Loop control variable `i` not used within the loop body.
# PLW0603 Using the global statement to update ...
# PLC1901 `stderr == ""` can be simplified to `not stderr` as an empty string is falsey
# B018 Found useless expression. Either assign it to a variable or remove it.
# S603 `subprocess` call: check for execution of untrusted input
"tests/*" = ["B011", "C408", "T201", "B007", "EM", "PTH", "PLW", "PLC1901", "B018", "S603", "ARG", "RET", "PGH"]

[tool.interrogate]
ignore-init-module=true
ignore-private=true
ignore-semiprivate=true
ignore-property-decorators=true
ignore-nested-functions=true
ignore-nested-classes=true
fail-under=95
exclude = ["docs", "tests"]

[tool.check-wheel-contents]
toplevel = ["ipykernel/", "ipykernel_launcher.py"]
ignore = ["W002"]

[tool.repo-review]
ignore = ["PY007", "PP308", "GH102", "MY101"]