Skip to content

Commit

Permalink
Use ruff 0.3.0 (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
karpetrosyan committed Mar 9, 2024
1 parent fba417b commit f3bb730
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 13 deletions.
3 changes: 1 addition & 2 deletions hishel/_async/_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ async def __aexit__(
exc_type: tp.Optional[tp.Type[BaseException]] = None,
exc_value: tp.Optional[BaseException] = None,
traceback: tp.Optional[TracebackType] = None,
) -> None:
...
) -> None: ...


class MockAsyncTransport(httpx.AsyncBaseTransport):
Expand Down
9 changes: 3 additions & 6 deletions hishel/_exceptions.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
__all__ = ("CacheControlError", "ParseError", "ValidationError")


class CacheControlError(Exception):
...
class CacheControlError(Exception): ...


class ParseError(CacheControlError):
...
class ParseError(CacheControlError): ...


class ValidationError(CacheControlError):
...
class ValidationError(CacheControlError): ...
3 changes: 1 addition & 2 deletions hishel/_sync/_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def __exit__(
exc_type: tp.Optional[tp.Type[BaseException]] = None,
exc_value: tp.Optional[BaseException] = None,
traceback: tp.Optional[TracebackType] = None,
) -> None:
...
) -> None: ...


class MockTransport(httpx.BaseTransport):
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,14 @@ exclude = [
"tests/_sync",
]
line-length = 120

[tool.ruff.lint]
select = [
"E",
"F",
"W",
"I"
]

[tool.ruff.isort]
[tool.ruff.lint.isort]
combine-as-imports = true
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-e .[yaml,redis,sqlite,s3]

# linting
ruff==0.1.6
ruff==0.3.0
mypy==1.8.0

# docs
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /bin/bash -ex

ruff format hishel tests
ruff --fix hishel tests
ruff check --fix hishel tests
python unasync.py

0 comments on commit f3bb730

Please sign in to comment.