@@ -49,138 +49,6 @@ Source = "https://github.com/symforce-org/symforce"
4949[tool .setuptools_scm ]
5050# Empty, presence enables setuptools_scm
5151
52- # --------------------------------------------------------------------------------
53- # Ruff
54- # --------------------------------------------------------------------------------
55-
56- [tool .ruff ]
57- line-length = 100
58- exclude = [" third_party" , " build" , " .eggs" , " lcmtypes" , " *.pyi" ]
59- extend-include = [" *.ipynb" ]
60-
61- [tool .ruff .format ]
62- line-ending = " lf"
63-
64- [tool .ruff .lint ]
65- preview = true
66- typing-modules = [" symforce.typing" ]
67-
68- select = [
69- " A" , # flake8
70- " B" , # flake8-bugbear
71- " D" , # docstrings
72- " E4" , # pycodestyle - ERROR - Imports - E401, E402
73- " E7" , # pycodestyle - ERROR - Statements - E701-E743
74- " E9" , # pycodestyle - ERROR - Runtime - E901, E902
75- " F" , # pyflakes - ALL - F401-F901
76- " I" , # isort
77- " PLC" , # pylint - convention
78- " PLE" , # pylint - error
79- " PLR" , # pylint - refactor
80- " PLW" , # pylint - warning
81- " RUF100" , # unused-noqa
82- " SLF" , # flake8-self
83- " TC" , # flake8-type-checking
84- " TD" , # flake8-todos
85- ]
86-
87- ignore = [
88- # --------------------------------------------------------------------------------
89- # Leave ignored
90- # --------------------------------------------------------------------------------
91-
92- # B (flake8-bugbear)
93- " B008" , # function-call-in-default-argument
94-
95- # D (pydocstyle)
96- # differences on top of default google conventions:
97- " D1" , # undocumented-*
98- " D417" , # undocumented-param
99- " D200" , # fits-on-one-line # Good rule, fix not always available
100- " D202" , # no-blank-line-after-function
101- " D205" , # blank-line-after-summary # Requires 1-line summaries, fix not always available
102- " D212" , # nulti-line-summary-first-line # Disagreement between Google and Skydio style
103- " D402" , # no-signature # Good rule, has false positives
104- " D403" , # first-line-capitalized
105- " D415" , # ends-in-punctuation
106-
107- # E (pycodestyle)
108- " E402" , # Module level import not at top of file
109- " E731" , # Do not assign a `lambda` expression, use a `def`
110- " E741" , # Ambiguous variable name: `x`
111-
112- # PL (pylint)
113- " PLC0415" , # import-outside-top-level
114- " PLC2701" , # Private name import `_x` from external module `y`
115- " PLR2004" , # magic-value-comparison
116- " PLW1514" , # unspecified-encoding
117- " PLW1641" , # eq-without-hash
118- " PLW2901" , # redefined-loop-name
119-
120- # TC (flake8-type-checking)
121- # SymForce does runtime resolution of annotations, so we disable rules that are designed with no
122- # runtime resolution of annotations in mind.
123- " TC001" , # typing-only-first-party-import
124- " TC002" , # typing-only-third-party-import
125- " TC003" , # typing-only-standard-library-import
126- " TC006" , # runtime-cast-value
127- " TC007" , # unquoted-type-alias
128-
129- # TD (flake8-todos)
130- " TD003" , # missing-todo-link
131-
132- # --------------------------------------------------------------------------------
133- # Maybe enable later
134- # --------------------------------------------------------------------------------
135-
136- " ARG" , # flake8-unused-arguments
137- " B011" , # Do not `assert False`, raise `AssertionError()`
138- ]
139-
140- extend-select = [
141- " D213" , # multi-line-summary-second-line # Disagreement between Google and SymForce style
142- ]
143-
144- [tool .ruff .lint .flake8-builtins ]
145- builtins-ignorelist = [" __doc__" ]
146-
147-
148- [tool .ruff .lint .per-file-ignores ]
149-
150- # Unused imports in __init__.py
151- "__init__.py" = [" F401" ]
152-
153- # Unbound loop variables in benchmark notebooks
154- "symforce/benchmarks/notebooks/*.ipynb" = [" B023" ]
155-
156- # Imports shadowing builtins (like display)
157- "**/*.ipynb" = [" A004" ]
158-
159- [tool .ruff .lint .isort ]
160- known-first-party = [" sym" , " symforce" ]
161- force-single-line = true
162- section-order = [
163- " future" ,
164- " standard-library" ,
165- " third-party" ,
166- " generated" ,
167- " first-party" ,
168- " local-folder" ,
169- ]
170-
171- [tool .ruff .lint .isort .sections ]
172- "generated" = [" lcmtypes" ]
173-
174- [tool .ruff .lint .pylint ]
175- max-args = 10
176- max-branches = 20
177- max-locals = 20
178- max-public-methods = 100
179- max-returns = 10
180-
181- [tool .ruff .lint .pydocstyle ]
182- convention = " google"
183-
18452# --------------------------------------------------------------------------------
18553# Mypy
18654# --------------------------------------------------------------------------------
0 commit comments