File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
1
from pathlib import Path
2
2
3
3
try :
4
- import importlib .resources as importlib_resources
5
- except ImportError : # < Python 3.9
6
4
import importlib_resources as importlib_resources
5
+ except ImportError : # < Python 3.9
6
+ import importlib .resources as importlib_resources
7
7
8
8
9
- swagger_ui_path : Path = importlib_resources .files ("py-swagger-ui " ) / "vendor/swagger-ui-4.15.5"
9
+ swagger_ui_path : Path = importlib_resources .files ("py_swagger_ui " ) / "vendor/swagger-ui-4.15.5"
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " py_swagger_ui"
3
- version = ' test '
3
+ version = ' 1.0.0 '
4
4
description = " Swagger UI bundled for usage with Python"
5
5
readme = " README.rst"
6
6
keywords = [" swagger-ui" ]
@@ -31,7 +31,8 @@ classifiers = [
31
31
32
32
[tool .poetry .dependencies ]
33
33
python = " ^3.7"
34
- Jinja2 = " ^2.0"
34
+ Jinja2 = " ^3.0.0"
35
+ importlib_resources = { version = " ^5.7.1" , python = " <3.9" }
35
36
36
37
[tool .poetry .group .test .dependencies ]
37
38
pytest = " ^7.1.3"
Original file line number Diff line number Diff line change 2
2
3
3
def test_import_ui ():
4
4
from py_swagger_ui import swagger_ui_path
5
- open (swagger_ui_path + "/ index.html" )
5
+ open (swagger_ui_path / " index.html" )
You can’t perform that action at this time.
0 commit comments