Skip to content

Commit 1aaf5c2

Browse files
authored
Bump syntax, tools and dependencies (#56)
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net> Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
1 parent 35d8d60 commit 1aaf5c2

File tree

5 files changed

+18
-19
lines changed

5 files changed

+18
-19
lines changed

docs/usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ Example of usage:
6060
6161
@pytest.mark.limit_memory("24 MB")
6262
def test_foobar():
63-
pass # do some stuff that allocates memory
63+
pass # do some stuff that allocates memory

pyproject.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
22
build-backend = "hatchling.build"
3-
requires = ["hatchling>=1.8", "hatch-vcs>=0.2"]
3+
requires = ["hatchling>=1.11.1", "hatch-vcs>=0.2"]
44

55
[project]
66
name = "pytest-memray"
@@ -19,29 +19,29 @@ maintainers = [
1919
]
2020
requires-python = ">=3.8"
2121
dependencies = [
22-
"pytest>=7.1.2",
23-
"memray>=1.3",
22+
"pytest>=7.2",
23+
"memray>=1.4.1",
2424
]
2525
optional-dependencies.docs = [
26-
"furo>=2022.6.21",
27-
"sphinx>=5.1.1",
28-
"sphinx-argparse>=0.3.1",
26+
"furo>=2022.9.29",
27+
"sphinx>=5.3",
28+
"sphinx-argparse>=0.4",
2929
"sphinx-inline-tabs>=2022.1.2b11",
3030
"sphinxcontrib-programoutput>=0.17",
31-
"towncrier>=21.9",
31+
"towncrier>=22.8",
3232
]
3333
optional-dependencies.lint = [
34-
"black==22.6",
35-
"flake8==5.0.4",
34+
"black==22.10",
35+
"flake8==6",
3636
"isort==5.10.1",
37-
"mypy==0.971",
37+
"mypy==0.991",
3838
]
3939
optional-dependencies.test = [
4040
"covdefaults>=2.2",
41-
"pytest>=7.1.2",
42-
"coverage>=6.4.4",
43-
"flaky>=3.7.0",
44-
"pytest-xdist>=3",
41+
"pytest>=7.2",
42+
"coverage>=6.5",
43+
"flaky>=3.7",
44+
"pytest-xdist>=3.0.2",
4545
]
4646
dynamic = ["version"]
4747
classifiers = [

src/pytest_memray/marks.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
from dataclasses import dataclass
4-
from typing import Optional
54
from typing import Tuple
65

76
from memray import AllocationRecord
@@ -48,7 +47,7 @@ def long_repr(self) -> str:
4847

4948
def limit_memory(
5049
limit: str, *, _allocations: list[AllocationRecord]
51-
) -> Optional[_MemoryInfo]:
50+
) -> _MemoryInfo | None:
5251
"""Limit memory used by the test."""
5352
max_memory = parse_memory_string(limit)
5453
total_allocated_memory = sum(record.size for record in _allocations)

src/pytest_memray/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def pytest_runtest_makereport(
184184
continue
185185
reader = FileReader(result.result_file)
186186
func = reader.get_high_watermark_allocation_records
187-
allocations = list((func(merge_threads=True)))
187+
allocations = list(func(merge_threads=True))
188188
res = marker_fn(*marker.args, **marker.kwargs, _allocations=allocations)
189189
if res:
190190
report.outcome = "failed"

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ setenv =
6060
basepython = python3.10
6161
skip_install = true
6262
deps =
63-
towncrier>=21.9
63+
towncrier>=22.8
6464
commands =
6565
make gen_news VERSION={posargs}
6666

0 commit comments

Comments
 (0)