@@ -37,7 +37,17 @@ pint = ["pint>=0.24"]
3737geo = [" shapely>=2.0" ]
3838polars = [" polars>=1.0" ]
3939all = [" pandas>=2.0" , " pint>=0.24" , " shapely>=2.0" , " polars>=1.0" ]
40- dev = [" pytest>=8.0" , " pandas>=2.0" , " pint>=0.24" , " shapely>=2.0" , " polars>=1.0" ]
40+ dev = [
41+ " pytest>=8.0" ,
42+ " pytest-cov>=5.0" ,
43+ " ruff>=0.8" ,
44+ " mypy>=1.13" ,
45+ " pre-commit>=4.0" ,
46+ " pandas>=2.0" ,
47+ " pint>=0.24" ,
48+ " shapely>=2.0" ,
49+ " polars>=1.0" ,
50+ ]
4151docs = [
4252 " sphinx>=7.4" ,
4353 " myst-parser>=3.0" ,
@@ -50,3 +60,61 @@ docs = [
5060[build-system ]
5161requires = [" hatchling" ]
5262build-backend = " hatchling.build"
63+
64+ [tool .ruff ]
65+ target-version = " py311"
66+ line-length = 99
67+
68+ [tool .ruff .lint ]
69+ select = [
70+ " E" , # pycodestyle errors
71+ " W" , # pycodestyle warnings
72+ " F" , # pyflakes
73+ " I" , # isort
74+ " UP" , # pyupgrade
75+ " B" , # flake8-bugbear
76+ " SIM" , # flake8-simplify
77+ " TCH" , # flake8-type-checking
78+ ]
79+ ignore = [
80+ " E501" , # line too long (handled by formatter)
81+ " E402" , # module level import not at top (circular import workarounds)
82+ " F821" , # undefined name (quoted forward references)
83+ " F841" , # local variable assigned but unused (intentional unpacking)
84+ " UP007" , # use X | Y for union types (NamedTuple compat)
85+ " UP017" , # use datetime.UTC alias (keep timezone.utc for broader compat)
86+ " UP035" , # import from collections.abc (keep typing imports)
87+ " UP037" , # remove quotes from type annotation (forward references)
88+ " B007" , # unused loop variable (intentional unpacking)
89+ " B905" , # zip() without strict= (Python 3.10+ style, keep compat)
90+ " E741" , # ambiguous variable name (single-letter in comprehensions)
91+ " SIM105" , # contextlib.suppress (explicit try/except preferred for clarity)
92+ " SIM108" , # ternary operator (readability preference)
93+ " SIM114" , # combine if branches (readability preference)
94+ " TC001" , # move import into TYPE_CHECKING (circular import issues)
95+ " TC002" , # move third-party import into TYPE_CHECKING
96+ " TC003" , # move stdlib import into TYPE_CHECKING (keep simple)
97+ ]
98+
99+ [tool .ruff .lint .per-file-ignores ]
100+ "tests/**" = [" B015" , " B018" ]
101+
102+ [tool .ruff .lint .isort ]
103+ known-first-party = [" timedatamodel" ]
104+
105+ [tool .mypy ]
106+ python_version = " 3.11"
107+ warn_return_any = true
108+ warn_unused_configs = true
109+ disallow_untyped_defs = false
110+ ignore_missing_imports = true
111+
112+ [tool .pytest .ini_options ]
113+ testpaths = [" tests" ]
114+
115+ [tool .coverage .run ]
116+ source = [" timedatamodel" ]
117+
118+ [tool .coverage .report ]
119+ show_missing = true
120+ skip_empty = true
0 commit comments