-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathpyproject.toml
101 lines (89 loc) · 3.33 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
[tool.poetry]
name = "flask-entra-auth"
version = "0.9.0"
description = "Flask extension for authenticating and authorising requests using Entra identity platform."
authors = ["Felix Fennell <[email protected]>"]
readme = "README.md"
license = "MIT"
packages = [{include = "flask_entra_auth", from = "src"}]
[tool.poetry.dependencies]
python = "^3.9"
authlib = "^1.3.1"
flask = ">=2.3,<4.0"
pyjwt = {extras = ["crypto"], version = "^2.9.0"}
requests = "^2.32.3"
joserfc = "^1.0.0"
[tool.poetry.group.dev.dependencies]
ruff = "^0.5.6"
safety = "^3.2.5"
[tool.poetry.group.test.dependencies]
pytest = "^8.3.2"
pytest-cov = "^5.0.0"
pytest-random-order = "^1.1.1"
pytest-httpserver = "^1.0.12"
[tool.ruff]
src = ["src"]
line-length = 120
target-version = "py39"
[tool.ruff.lint]
select = ["A", "ANN", "B", "B9", "C90", "C4", "D", "DTZ", "E", "EM", "ERA", "F", "FA", "I", "N", "PT", "PTH", "RET", "RUF", "S", "SIM", "TD", "TRY", "UP", "W"]
# A | builtins (variables named after builtin names)
# ANN | annotations (type hints)
# B | bug-bear (bad code)
# B9 | bug-bear opinionated (additional bad code)
# C90 | mccabe (code complexity)
# C4 | comprehensions (list/dict/set comprehensions)
# D | pydocstyle (docstring)
# DTZ | datetimez (date/time)
# E | pycodestyle errors (PEP8)
# EM | errmsg (exceptions)
# ERA | eraticate (comments)
# F | pyflakes (invalid/bad code)
# FA | uture-annotations (type hints)
# I | isort (import ordering)
# N | pep8-naming (PEP8)
# PT | pytest-style (tests)
# PTH | use-pathlib (old syntax)
# RET | return (return statements)
# RUF | ruff (other)
# S | bandit (static security)
# SIM | simplicity (code complexity)
# TD | todos (comments)
# TRY | tryceratops (exceptions)
# UP | pyupgrade (old syntax)
# W | pycodestyle warnings (PEP8)
ignore = ["ANN101", "ANN204", "D100", "D104", "D107", "D203", "D212", "D401", "D402", "E501", "TD002"]
# ANN101 | ignore missing self type (can't be used in Python 3.9)
# ANN204 | ignore docstring for magic methods (unecessary)
# D100 | for avoding module level docstrings (unecessary)
# D104 | for avoding package level docstrings (unecessary)
# D203 | for requring blank line before classes (which looks silly)
# D212 | for docstring requring multi-line comments to start on first line (which looks silly)
# D401 | for docstring being in interpretive mood (which sometimes isn't correctly determined)
# D402 | for docstring that can't resemble their signatures (despite them being completely different)
# E501 | for bug-bear compatibility (as B905 overrides line length checks)
# TD002 | for allowing TODOs without an author (as an issue should assign ownership)
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["ANN201", "S101"]
# tests/* | S101 | ignore use of assert
[tool.pytest.ini_options]
addopts = "--strict-markers --random-order -x --ff"
# --strict-markers | fail if unknown markers are used
# --random-order | run tests in random order
# -x | stop after first failure [Overriden in CI]
# --ff | run failed tests first
markers = [
"cov: coverage checks (deselect with '-m \"not cov\"')"
]
[tool.coverage.report]
skip_empty = true
show_missing = false
fail_under = 100
[tool.coverage.html]
directory = "htmlcov"
[tool.coverage.run]
branch = true
source = ["src"]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"