From 87545d0ae01291aa281378d5df48f6a5f831fbe6 Mon Sep 17 00:00:00 2001 From: Zach Kurtz Date: Sat, 30 Nov 2024 16:34:27 -0500 Subject: [PATCH] newer ruff settings --- docs/conf.py | 4 ++-- pyproject.toml | 23 +++++++++++++++++++++++ tests/test_packio.py | 1 + 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0bc9b1e..59b1a45 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,5 @@ -# Configuration file for the Sphinx documentation builder. -# +"""Configuration file for the Sphinx documentation builder.""" + # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html diff --git a/pyproject.toml b/pyproject.toml index aa79523..618c3e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,29 @@ package = true [tool.ruff] line-length = 120 +[tool.ruff.lint] +select = [ + # ruff defaults: + "E4", "E7", "E9", "F", + "I", # flake8-import-order + "TID", # flake8-tidy-imports + "D", # google-style docstrings +] +ignore = [ + "D202", # would require one blank line after the last section of a multi-line docstring + "D203", # would require one blank line at start of class docstring + "D213", # would require multi-line docstring to start with a hard return + "D401", # would require imperative mood in docstring + "D413", # would put blank line at end of each multiline docstring +] + +[tool.ruff.lint.flake8-tidy-imports] +ban-relative-imports = "all" + +[tool.ruff.lint.per-file-ignores] +"__init__.py" = ["D104"] # would require module-level documentation +"test_*.py" = ["D"] + [tool.pyright] include = ["packio", "tests"] diff --git a/tests/test_packio.py b/tests/test_packio.py index 7a3a1e9..487404a 100644 --- a/tests/test_packio.py +++ b/tests/test_packio.py @@ -2,6 +2,7 @@ import dummio import pandas as pd + from packio import Reader, Writer