-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
164 lines (143 loc) · 4.08 KB
/
pyproject.toml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
[project]
name = "emojdule"
authors = [
{name = "Dhia Hmila"},
]
description = "Import Python modules with snake emoji extension"
license = {text = "MIT License"}
requires-python = ">=3.6"
keywords = ["import", "emoji"]
readme = "README.md"
dynamic = ['version']
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[project.urls]
Repository = "https://github.com/hmiladhia/emojdule"
Issues = "https://github.com/hmiladhia/emojdule/issues"
[tool.ruff]
target-version = "py39"
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"E", # pycodestyle - Error
"W", # pycodestyle - Warning
"F", # Pyflakes
"N", # pep8-naming
"S", # flake8-bandit
"RUF", # Ruff-specific rules
"PLC", # Pylint Convention
"PLE", # Pylint Error
"PLW", # Pylint Warning
"PLR", # Pylint Refactor
"Q", # flake8-quotes
]
extend-select = [
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"C90", # mccabe (complexity)
"FA", # flake8-future-annotations
"ISC", # flake8-implicit-str-concat
"PIE", # flake8-pie ( misc lints )
"PERF", # Perflint
"PTH", # flake8-use-pathlib
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"TD", # flake8-todos (EXCLUDE TD002)
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"RET", # flake8-return
"RSE", # flake8-raise (RSE)
# Typing
"ANN", # flake8-annotations
"PYI", # flake8-pyi
"TCH", # flake8-type-checking
# Documentation
"D", # pydocstyle
# "DOC", # pydoclint # Preview
# Tool Specific
# "FAST", # FastAPI # Preview
"NPY", # NumPy-specific rules
"PD", # pandas-vet
"ICN", # flake8-import-conventions
"PT" # flake8-pytest-style ( Only use in tests )
]
extend-ignore = [
"ANN101", # flake8-annotations - missing-type-self
"D1", # pydocstyle - missing-docstring
"D203", # pydocstyle - one-blank-line-before-class
"D212", # multi-line-summary-first-line
"ISC001", # flake8-implicit-str-concat - single-line-implicit-string-concatenation
"TD002", # flake8-todos - missing-todo-author
]
[tool.ruff.lint.per-file-ignores]
"tests/**.py" = ["S101", "ANN201"]
"example/main.py" = ["S101", "ANN201"]
"!tests/**.py" = ["PT"]
[tool.ruff.lint.pycodestyle]
max-line-length = 100
ignore-overlong-task-comments = true
[tool.ruff.lint.mccabe]
max-complexity = 6
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [{include-group = "tests"}]
tests = [
"pytest>=8.3.4",
"pytest-sugar"
]
[tool.hatch.version]
path = "src/emojdule.py"
[tool.hatch.build.targets.wheel]
only-include=["src/emojdule.py"]
sources=["src"]
[tool.hatch.build.targets.wheel.hooks.autorun]
dependencies = ["hatch-autorun"]
code = "__import__('emojdule').install()"
[tool.tox]
min_version = "4"
requires = ["tox>=4.19", "tox-uv>=1"]
env_list = ["format", "lint", "type", "3.13", "3.12", "3.11", "3.10", "3.9"]
# This is a workaround
# See Issue: https://github.com/ymyzk/tox-gh-actions/issues/198
[tool.tox.gh-actions]
python = """
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313
"""
[tool.tox.env_run_base]
description = "run unit tests"
deps = [
"pytest>=8",
"pytest-sugar"
]
commands = [["pytest", { replace = "posargs", default = ["tests"], extend = true }]]
[tool.tox.env.format]
description = "run formatter"
skip_install = true
deps = ["ruff"]
commands = [["ruff", "format", { replace = "posargs", default = ["."], extend = true} ]]
[tool.tox.env.lint]
description = "run linters"
skip_install = true
deps = ["ruff"]
commands = [["ruff", "check", { replace = "posargs", default = ["."], extend = true} ]]
[tool.tox.env.type]
description = "run type checks"
deps = ["mypy"]
commands = [["mypy", { replace = "posargs", default = ["src", "tests"], extend = true} ]]