Skip to content

Commit b48aedd

Browse files
authored
PEP 621: Migrate .coveragerc and .mypy.ini into pyproject.toml (#23089)
https://peps.python.org/pep-0621 Migrate settings from `.coveragerc` and `.mypy.ini` into `pyproject.toml` using [ini2toml](https://pypi.org/project/ini2toml) to do the file conversion and running [pyproject-fmt](https://pypi.org/project/pyproject-fmt) to format the results. ```bash ini2toml .mypy.ini > pyproject.toml ini2toml .coveragerc >> pyproject.toml pyproject-fmt pyproject.toml git add pyproject.toml git rm .coveragerc git rm .mypy.ini ```
1 parent fb14f6d commit b48aedd

File tree

4 files changed

+36
-24
lines changed

4 files changed

+36
-24
lines changed

.coveragerc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.mypy.ini

Lines changed: 0 additions & 16 deletions
This file was deleted.

pyproject.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[tool.coverage.run]
2+
source = [ "." ]
3+
omit = [
4+
"./test/*",
5+
"./third_party/*",
6+
"./tools/emcoverage.py",
7+
"test.py",
8+
]
9+
10+
[tool.mypy]
11+
mypy_path = "third_party/,third_party/ply,third_party/websockify"
12+
files = [ "." ]
13+
exclude = '''
14+
(?x)(
15+
cache |
16+
third_party |
17+
conf\.py |
18+
emrun\.py |
19+
site/source/_themes/ |
20+
tools/scons/site_scons/site_tools/emscripten/__init__\.py |
21+
site/source/get_wiki\.py |
22+
test/parse_benchmark_output\.py
23+
)'''
24+
25+
[[tool.mypy.overrides]]
26+
module = [
27+
"tools.create_dom_pk_codes",
28+
"tools.webidl_binder",
29+
"tools.toolchain_profiler",
30+
"tools.filelock",
31+
"tools.find_bigvars",
32+
"leb128",
33+
"ply.*",
34+
]
35+
ignore_errors = true

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
flake8==5.0.4
88
flake8-bugbear==22.9.23
99
flake8-unused-arguments==0.0.11
10-
coverage==5.5
10+
coverage[toml]==5.5
1111
mypy==0.971
1212
types-requests==2.27.14
1313
unittest-xml-reporting==3.1.0

0 commit comments

Comments
 (0)