Skip to content

Commit ac53335

Browse files
committed
- fix last test
1 parent 5b8285c commit ac53335

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

.meta.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ testenv-additional = [
4848
" coverage combine",
4949
" coverage html",
5050
" coverage report -m --fail-under=100",
51-
"depends = py39,py310,py311,py312,py313,py314,py314-datetime,coverage",
51+
"depends = py310,py311,py311-datetime,py312,py313,py314,coverage",
5252
]
5353
coverage-command = "pytest --cov=src --cov=tests --cov-report= tests {posargs}"
5454
coverage-setenv = [

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def read(*rnames):
3535
long_description_content_type='text/x-rst',
3636
classifiers=[
3737
'Development Status :: 6 - Mature',
38+
'License :: OSI Approved :: Zope Public License',
3839
'Programming Language :: Python',
3940
'Operating System :: OS Independent',
4041
'Programming Language :: Python :: 3',

src/RestrictedPython/compile.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,14 @@
1010
from os import PathLike
1111
from typing import Any
1212
from typing import Literal
13+
from typing import TypeAlias
1314

1415
from RestrictedPython._compat import IS_CPYTHON
15-
from RestrictedPython._compat import IS_PY310_OR_GREATER
1616
from RestrictedPython.transformer import RestrictingNodeTransformer
1717

1818

19-
if IS_PY310_OR_GREATER:
20-
from typing import TypeAlias
21-
22-
# Temporary workaround for missing _typeshed
23-
ReadableBuffer: TypeAlias = bytes | bytearray
24-
else:
25-
from typing import TypeAlias # type: ignore[import]
26-
ReadableBuffer: TypeAlias = bytes | bytearray # type: ignore[no-redef]
19+
# Temporary workaround for missing _typeshed
20+
ReadableBuffer: TypeAlias = bytes | bytearray
2721

2822
CompileResult = namedtuple(
2923
'CompileResult', 'code, errors, warnings, used_names')

tests/transformer/test_tstring.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ def test_t_string_self_documenting_expressions():
7979
t_string_self_documenting_expressions_example,
8080
)
8181
assert result.errors == ()
82-
assert result.warnings == []
8382
assert result.code is not None
8483

8584
glb = {

0 commit comments

Comments
 (0)