backports-httpmethod 0.2.0b1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ # Global owner
2
+ * @edgarrmondragon
@@ -3,7 +3,7 @@ updates:
3
3
  - directory: /
4
4
  package-ecosystem: pip
5
5
  schedule:
6
- interval: weekly
6
+ interval: quarterly
7
7
  timezone: America/Mexico_City
8
8
  assignees:
9
9
  - "edgarrmondragon"
@@ -12,21 +12,13 @@ updates:
12
12
  commit-message:
13
13
  prefix: "chore(deps): "
14
14
  prefix-development: "chore(deps-dev): "
15
- - package-ecosystem: pip
16
- directory: /.github/workflows
17
- schedule:
18
- interval: monthly
19
- timezone: America/Mexico_City
20
- assignees:
21
- - "edgarrmondragon"
22
- reviewers:
23
- - "edgarrmondragon"
24
- commit-message:
25
- prefix: "ci: "
15
+ versioning-strategy: increase-if-necessary
16
+ cooldown:
17
+ default-days: 7
26
18
  - package-ecosystem: github-actions
27
19
  directory: "/"
28
20
  schedule:
29
- interval: monthly
21
+ interval: quarterly
30
22
  timezone: America/Mexico_City
31
23
  assignees:
32
24
  - "edgarrmondragon"
@@ -38,3 +30,5 @@ updates:
38
30
  actions:
39
31
  patterns:
40
32
  - "*"
33
+ cooldown:
34
+ default-days: 7
@@ -0,0 +1,42 @@
1
+ name: Build
2
+
3
+ on:
4
+ push:
5
+
6
+ permissions:
7
+ contents: read
8
+
9
+ concurrency:
10
+ cancel-in-progress: true
11
+ group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12
+
13
+ jobs:
14
+ build:
15
+ name: Build and Inspect
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
19
+ with:
20
+ persist-credentials: false
21
+ - uses: hynek/build-and-inspect-python-package@d44ca7d91762de7a7d5436ddae667c6da6d1c3df # v2.18.0
22
+
23
+ publish:
24
+ name: Publish to PyPI
25
+ runs-on: ubuntu-latest
26
+ needs: build
27
+ environment: publish
28
+ if: startsWith(github.ref, 'refs/tags/')
29
+ permissions:
30
+ id-token: write # Use PyPI trusted publishing
31
+
32
+ steps:
33
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
34
+ with:
35
+ persist-credentials: false
36
+ - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
37
+ with:
38
+ name: Packages
39
+ path: dist
40
+
41
+ - name: Publish
42
+ uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
@@ -8,7 +8,6 @@ on:
8
8
  - tests/**
9
9
  - pyproject.toml
10
10
  - .github/workflows/test.yaml
11
- - .github/workflows/constraints.txt
12
11
  pull_request:
13
12
  branches: [ main ]
14
13
  paths:
@@ -16,11 +15,13 @@ on:
16
15
  - tests/**
17
16
  - pyproject.toml
18
17
  - .github/workflows/test.yaml
19
- - .github/workflows/constraints.txt
20
18
  workflow_dispatch: {}
21
19
  schedule:
22
20
  - cron: "40 12 * * 1-5"
23
21
 
22
+ permissions:
23
+ contents: read
24
+
24
25
  concurrency:
25
26
  cancel-in-progress: true
26
27
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -33,45 +34,51 @@ jobs:
33
34
  name: Lint
34
35
  runs-on: ubuntu-latest
35
36
  steps:
36
- - uses: actions/checkout@v4
37
- - uses: actions/setup-python@v5
38
- id: setup-python
37
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
39
38
  with:
40
- cache: pip
41
- python-version: "3.12"
42
- - name: Install dependencies
43
- env:
44
- PIP_CONSTRAINT: .github/workflows/constraints.txt
45
- run: |
46
- pipx install --python '${{ steps.setup-python.outputs.python-path }}' hatch
47
- - name: Run lint
48
- env:
49
- HATCH_ENV: lint
39
+ persist-credentials: false
40
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
41
+ with:
42
+ python-version: 3.x
43
+ - uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
44
+ - name: Lint and type check
50
45
  run: |
51
- hatch run all
46
+ uvx tox -m lint
52
47
 
53
48
  test:
54
49
  name: Pytest (Python ${{ matrix.python-version }}, ${{ matrix.os }})
55
50
  runs-on: ${{ matrix.os }}
56
- continue-on-error: ${{ matrix.python-version == '3.13' }}
51
+ continue-on-error: ${{ matrix.python-version == '3.13' || matrix.python-version == '3.14' }}
57
52
  strategy:
58
53
  fail-fast: false
59
54
  matrix:
60
55
  os: ["ubuntu-latest"]
61
- python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
56
+ python-version:
57
+ - "3.8"
58
+ - "3.9"
59
+ - "3.10"
60
+ - "3.11"
61
+ - "3.12"
62
+ - "3.13"
63
+ - "3.14"
64
+ - "3.15"
65
+ - "pypy3.11"
62
66
  include:
63
- - python-version: "3.12"
67
+ - python-version: "3.7"
68
+ os: "ubuntu-22.04"
69
+ - python-version: "3.14"
64
70
  os: "windows-latest"
65
- - python-version: "3.12"
71
+ - python-version: "3.14"
66
72
  os: "macos-latest"
67
73
  steps:
68
- - uses: actions/checkout@v4
69
- - uses: actions/setup-python@v5
74
+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
75
+ with:
76
+ persist-credentials: false
77
+ - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
70
78
  id: setup-python
71
79
  with:
72
80
  cache: pip
73
81
  python-version: ${{ matrix.python-version }}
74
82
  allow-prereleases: true
75
- architecture: x64
76
83
  - run: pip install .
77
84
  - run: python -Im unittest -v
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023-present Edgar Ramírez-Mondragón <edgarrmondragon@hey.com>
3
+ Copyright (c) 2023-present Edgar Ramírez-Mondragón <edgarrm358@gmail.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
@@ -1,20 +1,13 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: backports-httpmethod
3
- Version: 0.2.0b1
3
+ Version: 0.2.2
4
4
  Summary: A backport of Python 3.11+ `http.HTTPMethod` enum
5
5
  Project-URL: Documentation, https://github.com/edgarrmondragon/backports.httpmethod#readme
6
6
  Project-URL: Issues, https://github.com/edgarrmondragon/backports.httpmethod/issues
7
7
  Project-URL: Source, https://github.com/edgarrmondragon/backports.httpmethod
8
- Author-email: Edgar Ramírez-Mondragón <edgarrmondragon@hey.com>
9
- License: MIT License
10
-
11
- Copyright (c) 2023-present Edgar Ramírez-Mondragón <edgarrmondragon@hey.com>
12
-
13
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
14
-
15
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8
+ Author-email: Edgar Ramírez-Mondragón <edgarrm358@gmail.com>
9
+ Maintainer-email: Edgar Ramírez-Mondragón <edgarrm358@gmail.com>
10
+ License-Expression: MIT
18
11
  License-File: LICENSE
19
12
  Keywords: backports,enum,http,httpmethod
20
13
  Classifier: Development Status :: 4 - Beta
@@ -27,6 +20,8 @@ Classifier: Programming Language :: Python :: 3.10
27
20
  Classifier: Programming Language :: Python :: 3.11
28
21
  Classifier: Programming Language :: Python :: 3.12
29
22
  Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Programming Language :: Python :: 3.15
30
25
  Classifier: Programming Language :: Python :: Implementation :: CPython
31
26
  Classifier: Programming Language :: Python :: Implementation :: PyPy
32
27
  Requires-Python: >=3.7
@@ -65,10 +60,10 @@ else:
65
60
  from backports.httpmethod import HTTPMethod
66
61
 
67
62
 
68
- HTTPMethod.GET == 'GET' # True
63
+ HTTPMethod.GET == "GET" # True
69
64
  HTTPMethod.GET.value # 'GET'
70
65
  HTTPMethod.GET.description # 'Retrieve the target.'
71
- list(HTTPMethod)[:3] # [<HTTPMethod.GET: 'GET'>, <HTTPMethod.HEAD: 'HEAD'>, <HTTPMethod.POST: 'POST'>]
66
+ list(HTTPMethod)[:3] # [<HTTPMethod.GET: 'GET'>, <HTTPMethod.HEAD: 'HEAD'>, <HTTPMethod.POST: 'POST'>]
72
67
  ```
73
68
 
74
69
  ## License
@@ -30,10 +30,10 @@ else:
30
30
  from backports.httpmethod import HTTPMethod
31
31
 
32
32
 
33
- HTTPMethod.GET == 'GET' # True
33
+ HTTPMethod.GET == "GET" # True
34
34
  HTTPMethod.GET.value # 'GET'
35
35
  HTTPMethod.GET.description # 'Retrieve the target.'
36
- list(HTTPMethod)[:3] # [<HTTPMethod.GET: 'GET'>, <HTTPMethod.HEAD: 'HEAD'>, <HTTPMethod.POST: 'POST'>]
36
+ list(HTTPMethod)[:3] # [<HTTPMethod.GET: 'GET'>, <HTTPMethod.HEAD: 'HEAD'>, <HTTPMethod.POST: 'POST'>]
37
37
  ```
38
38
 
39
39
  ## License
@@ -0,0 +1,175 @@
1
+ [build-system]
2
+ build-backend = "hatchling.build"
3
+ requires = [
4
+ "hatch-vcs",
5
+ "hatchling",
6
+ ]
7
+
8
+ [project]
9
+ name = "backports-httpmethod"
10
+ description = "A backport of Python 3.11+ `http.HTTPMethod` enum"
11
+ readme = "README.md"
12
+ keywords = [
13
+ "backports",
14
+ "enum",
15
+ "http",
16
+ "httpmethod",
17
+ ]
18
+ license = "MIT"
19
+ requires-python = ">=3.7"
20
+ classifiers = [
21
+ "Development Status :: 4 - Beta",
22
+ "Programming Language :: Python",
23
+ "Programming Language :: Python :: 3 :: Only",
24
+ "Programming Language :: Python :: 3.7",
25
+ "Programming Language :: Python :: 3.8",
26
+ "Programming Language :: Python :: 3.9",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Programming Language :: Python :: 3.13",
31
+ "Programming Language :: Python :: 3.14",
32
+ "Programming Language :: Python :: 3.15",
33
+ "Programming Language :: Python :: Implementation :: CPython",
34
+ "Programming Language :: Python :: Implementation :: PyPy",
35
+ ]
36
+ dynamic = [
37
+ "version",
38
+ ]
39
+ dependencies = [
40
+ "backports-strenum; python_version<'3.11'",
41
+ ]
42
+ [[project.authors]]
43
+ name = "Edgar Ramírez-Mondragón"
44
+ email = "edgarrm358@gmail.com"
45
+ [[project.maintainers]]
46
+ name = "Edgar Ramírez-Mondragón"
47
+ email = "edgarrm358@gmail.com"
48
+ [project.urls]
49
+ Documentation = "https://github.com/edgarrmondragon/backports.httpmethod#readme"
50
+ Issues = "https://github.com/edgarrmondragon/backports.httpmethod/issues"
51
+ Source = "https://github.com/edgarrmondragon/backports.httpmethod"
52
+
53
+ [dependency-groups]
54
+ dev = [
55
+ { include-group = "lint" },
56
+ { include-group = "typing" },
57
+ ]
58
+ lint = [
59
+ "pyproject-fmt~=2.25.2",
60
+ "ruff~=0.15.20",
61
+ ]
62
+ typing = [
63
+ "mypy~=2.2.0",
64
+ ]
65
+
66
+ [tool.hatch.build]
67
+ targets.wheel.packages = [
68
+ "src/backports",
69
+ ]
70
+ [tool.hatch.version]
71
+ fallback-version = "0.0.0.dev0"
72
+ source = "vcs"
73
+
74
+ [tool.ruff]
75
+ line-length = 120
76
+ preview = true
77
+ [tool.ruff.lint]
78
+ select = [
79
+ "A",
80
+ "ARG",
81
+ "B",
82
+ "C",
83
+ "COM",
84
+ "DTZ",
85
+ "E",
86
+ "EM",
87
+ "F",
88
+ "FBT",
89
+ "I",
90
+ "ICN",
91
+ "ISC",
92
+ "N",
93
+ "PLC",
94
+ "PLE",
95
+ "PLR",
96
+ "PLW",
97
+ "Q",
98
+ "RUF",
99
+ "S",
100
+ "T",
101
+ "TID",
102
+ "UP",
103
+ "W",
104
+ "YTT",
105
+ ]
106
+ ignore = [
107
+ # Conflict with the Ruff formatter
108
+ "COM812",
109
+ "ISC001",
110
+ ]
111
+ unfixable = [
112
+ # Don't touch unused imports
113
+ "F401",
114
+ ]
115
+ flake8-tidy-imports.ban-relative-imports = "all"
116
+
117
+ [tool.pyproject-fmt]
118
+ indent = 2
119
+ keep_full_version = true
120
+ max_supported_python = "3.15"
121
+ table_format = "long"
122
+
123
+ [tool.mypy]
124
+ mypy_path = "src"
125
+ enable_error_code = [ "ignore-without-code", "redundant-expr", "truthy-bool" ]
126
+
127
+ [tool.tox]
128
+ requires = [
129
+ "tox>=4.55",
130
+ ]
131
+ env_list = [
132
+ "lint",
133
+ { prefix = "3.", start = 7 },
134
+ "pypy",
135
+ "typing",
136
+ ]
137
+ [tool.tox.env.lint]
138
+ description = "lint"
139
+ dependency_groups = [
140
+ "lint",
141
+ ]
142
+ commands = [
143
+ [ "pyproject-fmt", "pyproject.toml" ],
144
+ [ "ruff", "check", { replace = "posargs", default = [], extend = true } ],
145
+ [ "ruff", "format", { replace = "posargs", default = [], extend = true } ],
146
+ ]
147
+ labels = [ "lint" ]
148
+ [tool.tox.env.typing]
149
+ description = "type check"
150
+ dependency_groups = [
151
+ "typing",
152
+ ]
153
+ commands = [
154
+ [
155
+ "mypy",
156
+ "--install-types",
157
+ "--non-interactive",
158
+ "--explicit-package-bases",
159
+ { replace = "posargs", default = [
160
+ "src/backports/httpmethod",
161
+ "tests",
162
+ ], extend = true },
163
+ ],
164
+ ]
165
+ labels = [ "lint" ]
166
+ [tool.tox.env_run_base]
167
+ description = "run unit tests on Python {base_python}"
168
+ commands = [
169
+ [
170
+ "python",
171
+ "-Im",
172
+ "unittest",
173
+ "-v",
174
+ ],
175
+ ]
@@ -0,0 +1,3 @@
1
+ from ._httpmethod import HTTPMethod # noqa: TID252
2
+
3
+ __all__ = ["HTTPMethod"]
@@ -13,7 +13,7 @@ class HTTPMethod(StrEnum):
13
13
 
14
14
  Methods from the following RFCs are all observed:
15
15
 
16
- * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616
16
+ * RFC 9110: HTTP Semantics, obsoletes 7231, which obsoleted 2616
17
17
  * RFC 5789: PATCH Method for HTTP
18
18
  """
19
19
 
@@ -1 +0,0 @@
1
- hatch==1.9.3
@@ -1,37 +0,0 @@
1
- name: Build
2
-
3
- on:
4
- push:
5
-
6
- permissions:
7
- contents: write
8
- id-token: write
9
-
10
- jobs:
11
- build:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v4
15
- - uses: hynek/build-and-inspect-python-package@v2
16
-
17
- publish:
18
- runs-on: ubuntu-latest
19
- needs: build
20
- environment: publish
21
- if: startsWith(github.ref, 'refs/tags/')
22
- steps:
23
- - uses: actions/checkout@v4
24
- - uses: actions/download-artifact@v4
25
- with:
26
- name: Packages
27
- path: dist
28
- - name: Upload wheel to release
29
- uses: svenstaro/upload-release-action@v2
30
- with:
31
- file: dist/*.whl
32
- tag: ${{ github.ref }}
33
- overwrite: true
34
- file_glob: true
35
-
36
- - name: Publish
37
- uses: pypa/gh-action-pypi-publish@v1.8.11
@@ -1,31 +0,0 @@
1
- ci:
2
- autofix_commit_msg: "chore: Fix lint errors"
3
- autofix_prs: true
4
- autoupdate_branch: main
5
- autoupdate_commit_msg: "chore: Update pre-commit hooks"
6
- autoupdate_schedule: weekly
7
- submodules: false
8
-
9
- repos:
10
- - repo: https://github.com/pre-commit/pre-commit-hooks
11
- rev: v4.5.0
12
- hooks:
13
- - id: check-merge-conflict
14
- - id: check-toml
15
- - id: end-of-file-fixer
16
- - id: no-commit-to-branch
17
- args: [--branch, main]
18
- - id: trailing-whitespace
19
-
20
- - repo: https://github.com/astral-sh/ruff-pre-commit
21
- rev: v0.2.0
22
- hooks:
23
- - id: ruff
24
- args: [--fix, --exit-non-zero-on-fix, --show-fixes]
25
- - id: ruff
26
- entry: ruff format
27
-
28
- - repo: https://github.com/tox-dev/pyproject-fmt
29
- rev: "1.7.0"
30
- hooks:
31
- - id: pyproject-fmt
@@ -1,169 +0,0 @@
1
- [build-system]
2
- build-backend = "hatchling.build"
3
- requires = [
4
- "hatch-vcs",
5
- "hatchling",
6
- ]
7
-
8
- [project]
9
- name = "backports-httpmethod"
10
- description = "A backport of Python 3.11+ `http.HTTPMethod` enum"
11
- readme = "README.md"
12
- keywords = [
13
- "backports",
14
- "enum",
15
- "http",
16
- "httpmethod",
17
- ]
18
- license.file = "LICENSE"
19
- authors = [
20
- { name = "Edgar Ramírez-Mondragón", email = "edgarrmondragon@hey.com" },
21
- ]
22
- requires-python = ">=3.7"
23
- classifiers = [
24
- "Development Status :: 4 - Beta",
25
- "Programming Language :: Python",
26
- "Programming Language :: Python :: 3 :: Only",
27
- "Programming Language :: Python :: 3.7",
28
- "Programming Language :: Python :: 3.8",
29
- "Programming Language :: Python :: 3.9",
30
- "Programming Language :: Python :: 3.10",
31
- "Programming Language :: Python :: 3.11",
32
- "Programming Language :: Python :: 3.12",
33
- "Programming Language :: Python :: 3.13",
34
- "Programming Language :: Python :: Implementation :: CPython",
35
- "Programming Language :: Python :: Implementation :: PyPy",
36
- ]
37
- dynamic = [
38
- "version",
39
- ]
40
- dependencies = [
41
- 'backports.strenum; python_version < "3.11"',
42
- ]
43
- urls.Documentation = "https://github.com/edgarrmondragon/backports.httpmethod#readme"
44
- urls.Issues = "https://github.com/edgarrmondragon/backports.httpmethod/issues"
45
- urls.Source = "https://github.com/edgarrmondragon/backports.httpmethod"
46
-
47
- [tool.hatch.build.targets.wheel]
48
- packages = ["src/backports"]
49
-
50
- [tool.hatch.version]
51
- source = "vcs"
52
-
53
- [tool.hatch.envs.default]
54
- [tool.hatch.envs.default.overrides]
55
- env.GITHUB_ACTIONS.dev-mode = { value = false, if = ["true"] }
56
- matrix.python.env-vars = [
57
- { key = "COVERAGE_CORE", value = "sysmon", if = ["3.12", "3.13"] }
58
- ]
59
- [tool.hatch.envs.default.scripts]
60
- test = "python -Im unittest {args}"
61
-
62
- [[tool.hatch.envs.all.matrix]]
63
- python = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
64
-
65
- [tool.hatch.envs.lint]
66
- dependencies = [
67
- "mypy>=1.0.0",
68
- "ruff>=0.1.0",
69
- ]
70
- [tool.hatch.envs.lint.scripts]
71
- typing = "mypy --install-types --non-interactive --explicit-package-bases {args:src/backports/httpmethod tests}"
72
- style = [
73
- "ruff check {args:.}",
74
- "ruff format --check {args:.}",
75
- ]
76
- fmt = [
77
- "ruff check --fix {args:.}",
78
- "ruff format {args:.}",
79
- "style",
80
- ]
81
- all = [
82
- "style",
83
- "typing",
84
- ]
85
-
86
- [tool.ruff]
87
- line-length = 120
88
- preview = true
89
- target-version = "py37"
90
-
91
- [tool.ruff.lint]
92
- select = [
93
- "A",
94
- "ARG",
95
- "B",
96
- "C",
97
- "COM",
98
- "DTZ",
99
- "E",
100
- "EM",
101
- "F",
102
- "FBT",
103
- "I",
104
- "ICN",
105
- "ISC",
106
- "N",
107
- "PLC",
108
- "PLE",
109
- "PLR",
110
- "PLW",
111
- "Q",
112
- "RUF",
113
- "S",
114
- "T",
115
- "TID",
116
- "UP",
117
- "W",
118
- "YTT",
119
- ]
120
- ignore = [
121
- # Allow non-abstract empty methods in abstract base classes
122
- "B027",
123
- # Allow boolean positional values in function calls, like `dict.get(... True)`
124
- "FBT003",
125
- # Ignore checks for possible passwords
126
- "S105", "S106", "S107",
127
- # Ignore complexity
128
- "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
129
- # Conflict with the Ruff formatter
130
- "COM812", "ISC001",
131
- ]
132
- unfixable = [
133
- # Don't touch unused imports
134
- "F401",
135
- ]
136
-
137
- [tool.ruff.lint.isort]
138
- known-first-party = ["backports_httpmethod"]
139
-
140
- [tool.ruff.lint.flake8-tidy-imports]
141
- ban-relative-imports = "all"
142
-
143
- [tool.ruff.lint.per-file-ignores]
144
- # Tests can use magic values, and relative imports
145
- "tests/**/*" = ["PLR2004", "TID252"]
146
-
147
- [tool.pyproject-fmt]
148
- indent = 2
149
- keep_full_version = true
150
- max_supported_python = "3.13"
151
-
152
- [tool.coverage.run]
153
- source_pkgs = ["backports", "tests"]
154
- branch = true
155
- parallel = true
156
-
157
- [tool.coverage.paths]
158
- backports_httpmethod = ["src/backports/httpmethod", "*/backports.httpmethod/src/backports/httpmethod"]
159
- tests = ["tests", "*/backports.httpmethod/tests"]
160
-
161
- [tool.coverage.report]
162
- exclude_also = [
163
- "no cov",
164
- "if __name__ == .__main__.:",
165
- "if TYPE_CHECKING:",
166
- ]
167
-
168
- [tool.mypy]
169
- mypy_path = "src"