Debian Codegraph @

pyproject.toml

raw symbols SCIP
1 [build-system]
2 requires = ["flit_core >=3.2,<4"]
3 build-backend = "flit_core.buildapi"
4
5 [project]
6 name = "pyglet"
7 authors = [
8 { name = "Alex Holkner & contributors", email = "[email protected]" },
9 ]
10 readme = "README.md"
11 license = { file = "LICENSE" }
12 dynamic = ["version", "description"]
13 requires-python = ">=3.8"
14
15 [project.urls]
16 Home = "https://pyglet.org"
17
18 [[tool.mypy.overrides]]
19 # mypy incorrectly reports issues everywhere in pyglet.math because:
20 # 1. pyglet.math is almost entirely typing.NamedTuple subclasses
21 # 2. The mypy project has the following long-standing stance on
22 # supporting collections.namedtuple and typing.NamedTuple:
23 # "Duplicate of #5613, still low priority, better use dataclasses,
24 # as suggested above."
25 # https://github.com/python/mypy/issues/5944#issuecomment-441285456
26 module = "pyglet.math"
27 ignore_errors = true
28
29 [tool.ruff]
30 line-length = 120
31 indent-width = 4
32 target-version = "py38"
33 exclude = ["venv/*", ".venv/*", "build/*", "doc/*", ".github/*", "tests"]
34
35 [tool.ruff.lint]
36 select = ["ALL"]
37 extend-safe-fixes = ["UP007", "UP006"]
38
39 ignore = [
40 "C90", # mccabe
41 "FBT", # allow boolean args.
42 "CPY", # copyright
43 "S101", # allow asserts.
44 "E731", # Allow lambda
45 "E741", # Allow short variable names.
46 "D102", # Do not check public method docstrings (Cannot determine overridden docstrings)
47 # @typing.override not available until python 3.12 (PEP 698)
48 "PLR", # Too many of too many checks.
49 "ANN101", # Ignore self type annotation.
50 "ANN401", # Allow Any as type annotation
51 "D105", # Allow no docstring magic method.
52 "SIM108", # Simplify if/else is not always best.
53 "PTH123", # allow to use `open` not `Path.open`
54 "TRY", # no triceratops.
55 "NPY", # remove numpy
56 "Q000", # double quotes
57 "ERA001", # allow commented-out code
58 "EM101", # String literals in exception
59 "B028", # No explicit stack level in warn
60 "FIX002", # Fixme
61 "TD003", # Missing issue link on the line following this TODO"
62 "T201", # allow writing print
63 ]
64
65 [tool.ruff.lint.isort]
66 known-first-party = ["pyglet"]
67 required-imports = ["from __future__ import annotations"]
68
69 [tool.ruff.lint.pydocstyle]
70 convention = "google"
71
72 [tool.ruff.lint.flake8-quotes]
73 inline-quotes = "single"
74
75 [tool.ruff.format]
76 quote-style = "preserve"
77 indent-style = "space"
78
79 [tool.ruff.lint.per-file-ignores]
80 # Ignore doc requirements, naming, arguments in platform and lib files.
81 "pyglet/font/fontconfig.py" = ["RUF012", "D", "N", "ARG"]
82 "pyglet/font/freetype.py" = ["RUF012", "D", "N", "ARG"]
83 "pyglet/font/freetype_lib.py" = ["RUF012", "D", "N", "ARG"]
84 "pyglet/font/quartz.py" = ["RUF012", "D", "N", "ARG"]
85 "pyglet/font/ttf.py" = ["RUF012", "D", "N", "ARG"]
86 "pyglet/font/win32.py" = ["RUF012", "D", "N", "ARG"]
87 "pyglet/window/cocoa/*" = ["RUF012", "D", "N", "ARG"]
88 "pyglet/window/headless/*" = ["RUF012", "D", "N", "ARG"]
89 "pyglet/window/win32/*" = ["RUF012", "D", "N", "ARG"]
90 "pyglet/window/xlib/*" = ["RUF012", "D", "N", "ARG"]
91 "pyglet/gui/*" = ["ARG002"]
92 "pyglet/libs/*" = ["RUF012", "D", "N", "ARG"]
93 "pyglet/lib.py" = ["ANN", "ARG002", "T201"]
94 "pyglet/gl/*" = ["N816", "I001", "N801", "E501", "D"]
95 "pyglet/__init__.py" = ["PGH003"]
96 "examples/*" = [
97 "I",
98 "D",
99 "B",
100 "W",
101 "S",
102 "ANN",
103 "ARG",
104 "E501",
105 "INP001",
106 "F811",
107 "PLW0602",
108 "PLW0604",
109 "SLF001",
110 "ERA001",
111 "F405",
112 ]
113 "tests/*" = ["I", "E", "F", "D", "B", "W", "S", "ANN", "ARG"]
114 "*_lib.py" = ["RUF012", "D", "N", "ARG"]