Skip to content

Commit

Permalink
Ignore sync files while linting
Browse files Browse the repository at this point in the history
  • Loading branch information
karpetrosyan committed Mar 1, 2024
1 parent 927bef3 commit 230ac9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions httpx/_clients/_sync_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
request_context,
)
from .._models import Request, Response
from .._transports.wsgi import WSGITransport
from .._transports.base import BaseTransport
from .._transports.default import HTTPTransport
from .._transports.wsgi import WSGITransport
from .._types import (
SyncByteStream,
AuthTypes,
CertTypes,
CookieTypes,
Expand All @@ -39,7 +40,6 @@
RequestData,
RequestExtensions,
RequestFiles,
SyncByteStream,
TimeoutTypes,
URLTypes,
VerifyTypes,
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ replacement = 'src="https://raw.githubusercontent.com/encode/httpx/master/\1"'
select = ["E", "F", "I", "B", "PIE"]
ignore = ["B904", "B028"]

exclude = ["httpx/_clients/_sync_client.py"]

[tool.ruff.isort]
combine-as-imports = true

Expand Down
6 changes: 0 additions & 6 deletions scripts/unasync.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
from pprint import pprint

SUBS = [
('from .._backends.auto import AutoBackend', 'from .._backends.sync import SyncBackend'),
('from .._transports.asgi import ASGITransport', 'from .._transports.wsgi import WSGITransport'),
('import trio as concurrency', 'from tests import concurrency'),
('BoundAsyncStream', 'BoundSyncStream'),
('AsyncByteStream', 'SyncByteStream'),
('ASGITransport', 'WSGITransport'),
Expand All @@ -23,17 +21,13 @@
('await ', ''),
('handle_async_request', 'handle_request'),
('aclose', 'close'),
('aiter_stream', 'iter_stream'),
('aread', 'read'),
('asend', 'send'),
('asynccontextmanager', 'contextmanager'),
('__aenter__', '__enter__'),
('__aexit__', '__exit__'),
('__aiter__', '__iter__'),
('__anext__', '__next__'),
('@pytest.mark.anyio', ''),
('@pytest.mark.trio', ''),
('AutoBackend', 'SyncBackend'),
]
COMPILED_SUBS = [
(re.compile(r'(^|\b)' + regex + r'($|\b)'), repl)
Expand Down

0 comments on commit 230ac9a

Please sign in to comment.