-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
58 lines (48 loc) · 1.94 KB
/
Copy pathpyproject.toml
File metadata and controls
58 lines (48 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
[tool.poetry]
name = "lambda-strip-docx"
version = "1.1.0"
description = "AWS Lambda function for cleaning DOCX and PDF documents"
authors = ["The National Archives <digitalrecords@nationalarchives.gov.uk>"]
readme = "README.md"
packages = [{include = "document_cleanser_lambda", from = "."}]
[tool.poetry.dependencies]
python = "^3.13.0"
lxml = "6.1.1"
rollbar = "1.3.0"
boto3 = "1.43.32"
pdf2image = "1.17.0"
Pillow = "12.2.0"
filetype = "1.2.0"
python-dotenv = "1.2.2"
[tool.poetry.group.dev.dependencies]
pytest = "9.1.0"
moto = {extras = ["s3"], version = "5.2.2"}
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.group.dev]
optional = true
[tool.ruff]
line-length = 120
[tool.ruff.lint]
ignore = ["E501", "G004", "PLR2004", "RUF005", "RUF012", "UP040"] # long lines, fstrings in logs, magic values, consider not concat, mutable classbits, type instead of TypeAlias
extend-select = ["W", "B", "Q", "C90", "I", "UP", "YTT", "ASYNC", "S", "BLE", "A", "COM", "C4", "DTZ", "T10", "DJ", "EM", "EXE", "FA",
"ISC", "ICN", "G", "INP", "PIE", "T20", "PYI", "PT", "Q", "RSE", "RET", "SLF", "SLOT", "SIM", "TID", "TCH", "INT", "PTH",
"FIX", "PGH", "PL", "TRY", "FLY", "PERF", "RUF"]
unfixable = ["ERA"]
# things skipped:
# N: naming, possibly good
# D: docstrings missing throughout
# ANN: annotations missing throughout
# FBT: not convinced boolean trap worth auto-banning.
# CPY: copyright at top of each file
# G: logging warnings -- fstrings bad?
# ARG: sometimes you need to accept arguments.
# TD: somewhat finicky details about formatting TODOs
# FIX: flags todos: possible to add -- skipped for now
# ERA: lots of false positives, not a good autofix
# PD, NPY, AIR: ignored, panda / numpy / airflow specific
# FURB: not yet out of preview
[tool.ruff.lint.extend-per-file-ignores]
"**/tests/*" = ["S101"] # tests allowed assert
"clean_*.py" = ["S603"] # subprocess untrusted input false alarms