Skip to content

Commit 08c3685

Browse files
committed
lint:
1 parent 85e2584 commit 08c3685

14 files changed

Lines changed: 180 additions & 146 deletions

.vscode/settings.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
"tests"
44
],
55
"python.testing.unittestEnabled": false,
6-
"python.testing.pytestEnabled": true
7-
}
6+
"python.testing.pytestEnabled": true,
7+
"python.analysis.extraPaths": [
8+
"./src"
9+
]
10+
}

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ services:
1515
POSTGRES_PASSWORD: postgres
1616
POSTGRES_DB: postgres
1717
volumes:
18-
- ./docker-config/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro
18+
- ./docker-config/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql:ro

docker-config/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626
<table>users</table>
2727
<tableattr>user_attr</tableattr>
2828
</sqlserverext>
29-
</config>
29+
</config>

docker-config/init-db.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ CREATE TABLE user_attr
1818
);
1919

2020

21-
INSERT INTO users (sid, login, pwd) VALUES ('docker', 'docker', 'docker')
21+
INSERT INTO users (sid, login, pwd) VALUES ('docker', 'docker', 'docker')

mellophone.py

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,33 @@
1-
from __future__ import annotations
1+
from __future__ import annotations
22

3-
import sys
3+
from typing import TYPE_CHECKING
44

5-
from src.mellophone import client as _client
5+
if TYPE_CHECKING:
6+
from src.mellophone import (
7+
AsyncClientUnavailableError, # noqa: F401
8+
BadRequestError, # noqa: F401
9+
ForbiddenError, # noqa: F401
10+
HttpError, # noqa: F401
11+
Mellophone, # noqa: F401
12+
NotFoundError, # noqa: F401
13+
RequestArgs, # noqa: F401
14+
RequestParams, # noqa: F401
15+
RequestTimeoutError, # noqa: F401
16+
ResponseParseError, # noqa: F401
17+
ServerError, # noqa: F401
18+
TransportError, # noqa: F401
19+
UnauthorizedError, # noqa: F401
20+
element_to_dict, # noqa: F401
21+
httpx, # noqa: F401
22+
merge_value, # noqa: F401
23+
normalize_key, # noqa: F401
24+
requests, # noqa: F401
25+
user_to_xml, # noqa: F401
26+
xml_to_json, # noqa: F401
27+
)
28+
else:
29+
import sys
630

7-
sys.modules[__name__] = _client
31+
from src.mellophone import client as _client
32+
33+
sys.modules[__name__] = _client

pyproject.toml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ dependencies = []
88

99
[project.optional-dependencies]
1010
httpx = [
11-
"httpx>=0.28.1",
11+
"httpx>=0.28.1",
1212
]
1313
requests = [
14-
"requests>=2.32.0",
14+
"requests>=2.32.0",
1515
]
1616

1717
[dependency-groups]
1818
dev = [
19-
"httpx>=0.28.1",
20-
"pytest>=9.0.2",
21-
"requests>=2.32.0",
22-
"pyyaml>=6.0.3",
23-
"ruff>=0.15.1",
24-
"pre-commit>=4.3.0",
19+
"httpx>=0.28.1",
20+
"pre-commit>=4.3.0",
21+
"pytest>=9.0.2",
22+
"pyyaml>=6.0.3",
23+
"requests>=2.32.0",
24+
"ruff>=0.15.1",
2525
]
2626

2727
[tool.ruff]
@@ -39,7 +39,6 @@ select = [
3939
"UP", # pyupgrade
4040
"ARG001", # unused arguments in functions
4141
"T201", # print statements are not allowed
42-
4342
]
4443
ignore = []
4544

src/mellophone/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from __future__ import annotations
1+
from __future__ import annotations
22

33
from .client import Mellophone, httpx, requests
44
from .exceptions import (

0 commit comments

Comments
 (0)