Skip to content

Commit daafe12

Browse files
committed
F401
Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net>
1 parent 15f0244 commit daafe12

2 files changed

Lines changed: 99 additions & 8 deletions

File tree

.readthedocs.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ version: 2
22
build:
33
os: ubuntu-24.04
44
tools:
5-
python: "3.10"
6-
commands:
7-
- asdf plugin add uv
8-
- asdf install uv latest
9-
- asdf global uv latest
10-
- uv venv
11-
- uv pip install .[doc,pre]
12-
- .venv/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
5+
python: "3.12"
136
sphinx:
147
configuration: docs/conf.py
158
fail_on_warning: true
9+
python:
10+
install:
11+
- method: pip
12+
path: .
13+
extra_requirements:
14+
- doc
15+
- pre

pyproject.toml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,97 @@ exclude = [
8989
"dist",
9090
"setup.py",
9191
]
92+
lint.select = [
93+
"F", # Errors detected by Pyflakes
94+
"E", # Error detected by Pycodestyle
95+
"W", # Warning detected by Pycodestyle
96+
"I", # isort
97+
"D", # pydocstyle
98+
"B", # flake8-bugbear
99+
"TID", # flake8-tidy-imports
100+
"C4", # flake8-comprehensions
101+
"BLE", # flake8-blind-except
102+
"UP", # pyupgrade
103+
"RUF100", # Report unused noqa directives
104+
"TCH", # Typing imports
105+
"NPY", # Numpy specific rules
106+
"PTH", # Use pathlib
107+
"S" # Security
108+
]
109+
lint.ignore = [
110+
# Do not catch blind exception: `Exception`
111+
"BLE001",
112+
# Errors from function calls in argument defaults. These are fine when the result is immutable.
113+
"B008",
114+
# line too long -> we accept long comment lines; black gets rid of long code lines
115+
"E501",
116+
# Do not assign a lambda expression, use a def -> lambda expression assignments are convenient
117+
"E731",
118+
# allow I, O, l as variable names -> I is the identity matrix
119+
"E741",
120+
# Missing docstring in public module
121+
"D100",
122+
# undocumented-public-class
123+
"D101",
124+
# Missing docstring in public method
125+
"D102",
126+
# Missing docstring in public function
127+
"D103",
128+
# Missing docstring in public package
129+
"D104",
130+
# __magic__ methods are are often self-explanatory, allow missing docstrings
131+
"D105",
132+
# Missing docstring in public nested class
133+
"D106",
134+
# Missing docstring in __init__
135+
"D107",
136+
## Disable one in each pair of mutually incompatible rules
137+
# We don’t want a blank line before a class docstring
138+
"D203",
139+
# 1 blank line required after class docstring
140+
"D204",
141+
# first line should end with a period [Bug: doesn't work with single-line docstrings]
142+
# We want docstrings to start immediately after the opening triple quote
143+
"D213",
144+
# Section underline is over-indented ("{name}")
145+
"D215",
146+
# First line should be in imperative mood; try rephrasing
147+
"D401",
148+
# First word of the first line should be capitalized: {} -> {}
149+
"D403",
150+
# First word of the docstring should not be "This"
151+
"D404",
152+
# Section name should end with a newline ("{name}")
153+
"D406",
154+
# Missing dashed underline after section ("{name}")
155+
"D407",
156+
# Section underline should be in the line following the section's name ("{name}")
157+
"D408",
158+
# Section underline should match the length of its name ("{name}")
159+
"D409",
160+
# No blank lines allowed between a section header and its content ("{name}")
161+
"D412",
162+
# Missing blank line after last section ("{name}")
163+
"D413",
164+
# Missing argument description in the docstring
165+
"D417",
166+
# camcelcase imported as lowercase
167+
"N813",
168+
# module import not at top level of file
169+
"E402",
170+
# open()` should be replaced by `Path.open()
171+
"PTH123",
172+
# subprocess` call: check for execution of untrusted input - https://github.com/PyCQA/bandit/issues/333
173+
"S603",
174+
# Starting a process with a partial executable path
175+
"S607",
176+
# Prefer absolute imports over relative imports from parent modules
177+
"TID252",
178+
# Standard pseudo-random generators are not suitable for cryptographic purposes
179+
"S311",
180+
# Unused imports
181+
"F401",
182+
]
92183

93184
[tool.jupytext]
94185
formats = "ipynb,md"

0 commit comments

Comments
 (0)