|
1 | | -[tool.black] |
2 | | -line-length = 120 |
3 | | -target-version = [ |
4 | | - 'py312', |
5 | | - 'py313', |
| 1 | +[build-system] |
| 2 | +build-backend = "setuptools.build_meta" |
| 3 | + |
| 4 | +requires = [ "setuptools", "setuptools-scm[toml]>=6.2", "wheel" ] |
| 5 | + |
| 6 | +[project] |
| 7 | +name = "puremagic" |
| 8 | +description = "Pure python implementation of magic file detection" |
| 9 | +readme = "README.rst" |
| 10 | +license = "MIT" |
| 11 | +authors = [ |
| 12 | + { name = "Chris Griffith", email = "[email protected]" }, |
| 13 | +] |
| 14 | +requires-python = ">=3.12" |
| 15 | +classifiers = [ |
| 16 | + "Development Status :: 5 - Production/Stable", |
| 17 | + "Intended Audience :: Developers", |
| 18 | + "Natural Language :: English", |
| 19 | + "Operating System :: OS Independent", |
| 20 | + "Programming Language :: Python", |
| 21 | + "Programming Language :: Python :: 3 :: Only", |
| 22 | + "Programming Language :: Python :: 3.12", |
| 23 | + "Programming Language :: Python :: 3.13", |
| 24 | + "Programming Language :: Python :: Implementation :: PyPy", |
| 25 | + "Topic :: Utilities", |
| 26 | +] |
| 27 | + |
| 28 | +dynamic = [ "version" ] |
| 29 | +urls.Homepage = "https://github.com/cdgriffith/puremagic" |
| 30 | +scripts.fastflix = "puremagic.__main__:command_line_entry" |
| 31 | + |
| 32 | +[dependency-groups] |
| 33 | +dev = [ |
| 34 | + "coverage>=7.9.2", |
| 35 | + "pre-commit>=4.2", |
| 36 | + "pytest>=8.4.1", |
| 37 | + "pytest-cov>=6.2.1", |
| 38 | + "ruff>=0.12.2", |
| 39 | + "setuptools>=80.9", |
| 40 | + "twine>=6.1", |
| 41 | + "wheel>=0.45.1", |
6 | 42 | ] |
7 | | -exclude = ''' |
8 | | -/( |
9 | | - \.eggs |
10 | | - | \.git |
11 | | - | \.idea |
12 | | - | \.pytest_cache |
13 | | - | \.github |
14 | | - | _build |
15 | | - | build |
16 | | - | dist |
17 | | - | venv |
18 | | - | test/resources |
19 | | -)/ |
20 | | -''' |
| 43 | + |
| 44 | +[tool.setuptools.packages.find] |
| 45 | +where = [ "." ] |
| 46 | +include = [ "puremagic*" ] |
| 47 | + |
| 48 | +[tool.setuptools.package-data] |
| 49 | +"*" = [ '*.json' ] |
| 50 | + |
| 51 | +[tool.setuptools.dynamic] |
| 52 | +version = { attr = "puremagic.main.__version__" } |
21 | 53 |
|
22 | 54 | [tool.ruff] |
| 55 | +target-version = "py312" |
| 56 | + |
23 | 57 | line-length = 120 |
| 58 | +indent-width = 4 |
24 | 59 |
|
25 | | -lint.select = [ |
26 | | - "ALL", |
| 60 | +# Exclude a variety of commonly ignored directories. |
| 61 | +exclude = [ |
| 62 | + ".direnv", |
| 63 | + ".eggs", |
| 64 | + ".git", |
| 65 | + ".git-rewrite", |
| 66 | + ".ipynb_checkpoints", |
| 67 | + ".mypy_cache", |
| 68 | + ".pytest_cache", |
| 69 | + ".pytype", |
| 70 | + ".ruff_cache", |
| 71 | + ".venv", |
| 72 | + ".vscode", |
| 73 | + "__pypackages__", |
| 74 | + "_build", |
| 75 | + "buck-out", |
| 76 | + "build", |
| 77 | + "dist", |
| 78 | + "venv", |
27 | 79 | ] |
28 | | -lint.extend-ignore = [ |
29 | | - "ANN", |
30 | | - "B008", |
31 | | - "BLE001", |
32 | | - "C408", |
33 | | - "C901", # too complex |
34 | | - "COM812", |
35 | | - "D", |
36 | | - "EM101", |
37 | | - "EM103", |
38 | | - "EXE001", |
39 | | - "F401", |
40 | | - "F403", |
41 | | - "FA102", |
42 | | - "FBT", |
43 | | - "FIX002", |
44 | | - "I001", |
45 | | - "INP001", |
46 | | - "N817", |
47 | | - "PERF401", |
48 | | - "PGH003", |
49 | | - "PLR0911", # Too many return statements |
50 | | - "PLR0912", # Too many branches |
51 | | - "PLR0913", # Too many arguments in function definition |
52 | | - "PLR2004", |
53 | | - "PT", |
54 | | - "PTH", |
55 | | - "PYI024", |
56 | | - "S101", |
57 | | - "S110", |
58 | | - "S112", |
59 | | - "S314", |
60 | | - "SLF001", |
61 | | - "T201", |
62 | | - "TCH003", |
63 | | - "TD002", |
64 | | - "TD003", |
65 | | - "TRY003", |
66 | | - "UP", |
67 | | -] |
68 | | -lint.pylint.allow-magic-value-types = [ |
69 | | - "float", |
70 | | - "int", |
71 | | - "str", |
72 | | -] |
73 | | -lint.pylint.max-branches = 13 |
| 80 | + |
| 81 | +# Like Black, indent with spaces, rather than tabs. |
| 82 | +format.indent-style = "space" |
| 83 | +# Like Black, use double quotes for strings. |
| 84 | +format.quote-style = "double" |
| 85 | +format.line-ending = "lf" |
| 86 | +# Like Black, respect magic trailing commas. |
| 87 | +format.skip-magic-trailing-comma = false |
| 88 | +# Set the line length limit used when formatting code snippets in |
| 89 | +# docstrings. |
| 90 | +# |
| 91 | +# This only has an effect when the `docstring-code-format` setting is |
| 92 | +# enabled. |
| 93 | +format.docstring-code-line-length = "dynamic" |
| 94 | +# Enable auto-formatting of code examples in docstrings. Markdown, |
| 95 | +# reStructuredText code/literal blocks and doctests are all supported. |
| 96 | +# |
| 97 | +# This is currently disabled by default, but it is planned for this |
| 98 | +# to be opt-out in the future. |
| 99 | +format.docstring-code-format = true |
| 100 | +lint.fixable = [ "F541" ] |
| 101 | +lint.unfixable = [ "F401" ] |
0 commit comments