diff --git a/cfg/__init__.py b/cfg/__init__.py index 60ec0bd..08d358d 100644 --- a/cfg/__init__.py +++ b/cfg/__init__.py @@ -1,10 +1,8 @@ """Python Configuration System""" from __future__ import annotations -from .errors import * from .helpers import get_output_dir -from .interfaces import * -from .leaf import * -from .node import * +from .leaf import CL +from .node import CN __version__ = "3.1.2" diff --git a/pyproject.toml b/pyproject.toml index 55408e9..bd2c1f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,3 +51,28 @@ version_variable = "ntc/__init__.py:__version__" minversion = "6.0" addopts = "--doctest-modules" +[tool.ruff] +target-version = "py312" +line-length = 120 +[tool.ruff.lint] +preview = true +select = [ + "A", "B", "E", "F", "I", "N", "R", "S", "Q", "W", + "ARG", "BLE", "C4", "COM", "ERA", "FBT", "FIX", "FLY", "FURB", "IC", "INP", "ISC", + "LOG", "NPY", "PERF", "PIE", "PT", "PTH", "RET", "RSE", "SIM", "SLF", "T20", "TCH", + "TD", "TID", "TRY", "UP" +] +# Allow fix for all enabled rules (when `--fix`) is provided. +fixable = ["ALL"] +ignore = ["UP035", "RET503", "S113", "TD002", "TD003", "N817", "FIX002", "TRY003", + "UP007", "A003", "PTH123", "E203", +] +[tool.ruff.per-file-ignores] +"tests/**/*.py" = [ + "S101", # Asserts in tests are fine + "T201", # Prints are useful for debugging + "E501", # Test strings can be long +] +"**/__init__.py" = [ + "F401", # Allow unused imports in module files +]