|
| 1 | +# Copyright 2020 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +[build-system] |
| 16 | +requires = [ |
| 17 | + "setuptools", |
| 18 | + "wheel", |
| 19 | +] |
| 20 | + |
| 21 | +[tool.ruff] |
| 22 | +line-length = 88 |
| 23 | + |
| 24 | +[tool.ruff.lint] |
| 25 | +select = [ |
| 26 | + # pycodestyle |
| 27 | + "E", |
| 28 | + "W", |
| 29 | + # Pyflakes |
| 30 | + "F", |
| 31 | + # pyupgrade |
| 32 | + "UP", |
| 33 | + # flake8-bugbear |
| 34 | + "B", |
| 35 | + # flake8-simplify |
| 36 | + "SIM", |
| 37 | + # isort |
| 38 | + "I", |
| 39 | + # pep8 naming |
| 40 | + "N", |
| 41 | + # pydocstyle |
| 42 | + "D", |
| 43 | + # annotations |
| 44 | + "ANN", |
| 45 | + # debugger |
| 46 | + "T10", |
| 47 | + # flake8-pytest |
| 48 | + "PT", |
| 49 | + # flake8-return |
| 50 | + "RET", |
| 51 | + # flake8-unused-arguments |
| 52 | + "ARG", |
| 53 | + # flake8-fixme |
| 54 | + "FIX", |
| 55 | + # flake8-eradicate |
| 56 | + "ERA", |
| 57 | + # pandas-vet |
| 58 | + "PD", |
| 59 | + # numpy-specific rules |
| 60 | + "NPY", |
| 61 | +] |
| 62 | + |
| 63 | +ignore = [ |
| 64 | + "D104", # Missing docstring in public package |
| 65 | + "D100", # Missing docstring in public module |
| 66 | + "D211", # No blank line before class |
| 67 | + "PD901", # Avoid using 'df' for pandas dataframes. Perfectly fine in functions with limited scope |
| 68 | + "ANN201", # Missing return type annotation for public function (makes no sense for NoneType return types...) |
| 69 | + "ANN101", # Missing type annotation for `self` |
| 70 | + "ANN204", # Missing return type annotation for special method |
| 71 | + "ANN002", # Missing type annotation for `*args` |
| 72 | + "ANN003", # Missing type annotation for `**kwargs` |
| 73 | + "D105", # Missing docstring in magic method |
| 74 | + "D203", # 1 blank line before after class docstring |
| 75 | + "D204", # 1 blank line required after class docstring |
| 76 | + "D413", # 1 blank line after parameters |
| 77 | + "SIM108", # Simplify if/else to one line; not always clearer |
| 78 | + "D206", # Docstrings should be indented with spaces; unnecessary when running ruff-format |
| 79 | + "E501", # Line length too long; unnecessary when running ruff-format |
| 80 | + "W191", # Indentation contains tabs; unnecessary when running ruff-format |
| 81 | +] |
| 82 | + |
| 83 | +[tool.ruff.lint.per-file-ignores] |
| 84 | +"__init__.py" = ["F401"] |
0 commit comments