Skip to content

Commit

Permalink
bump black in precommit and run on the lib (#647)
Browse files Browse the repository at this point in the history
* bump methods
* bump precommit
  • Loading branch information
beliaev-maksim authored Jun 28, 2023
1 parent a23f22d commit 4fa21e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.3.0
hooks:
- id: black
args: [--line-length=88, --safe]
Expand All @@ -26,7 +26,7 @@ repos:
- id: flake8
args: [ '--max-line-length', '100', '--max-doc-length', '120' ]
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
rev: 1.14.0
hooks:
- id: blacken-docs
additional_dependencies: [ black == 23.1a1 ]
additional_dependencies: [ black == 23.3.0 ]
6 changes: 2 additions & 4 deletions responses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ def get_wrapped(
# set asynchronous wrapper if requestor function is asynchronous
@wraps(func)
async def wrapper(*args: Any, **kwargs: Any) -> Any: # type: ignore[misc]

if registry is not None:
responses._set_registry(registry)

Expand All @@ -207,7 +206,6 @@ async def wrapper(*args: Any, **kwargs: Any) -> Any: # type: ignore[misc]

@wraps(func)
def wrapper(*args: Any, **kwargs: Any) -> Any: # type: ignore[misc]

if registry is not None:
responses._set_registry(registry)

Expand Down Expand Up @@ -900,7 +898,6 @@ def add_callback(
content_type: Optional[str] = "text/plain",
match: "_MatcherIterable" = (),
) -> None:

self._registry.add(
CallbackResponse(
url=url,
Expand Down Expand Up @@ -1085,7 +1082,8 @@ def _on_request(
Here we're emulating the `if isinstance(e.reason, ResponseError):`
branch found at:
https://github.com/psf/requests/blob/
177dd90f18a8f4dc79a7d2049f0a3f4fcc5932a0/requests/adapters.py#L549"""
177dd90f18a8f4dc79a7d2049f0a3f4fcc5932a0/requests/adapters.py#L549
"""
raise RetryError(e, request=request)

return response
Expand Down
1 change: 0 additions & 1 deletion responses/tests/test_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def setup(self):
assert not self.out_file.exists()

def test_recorder(self, httpserver):

url202, url400, url404, url500 = self.prepare_server(httpserver)

def another():
Expand Down

0 comments on commit 4fa21e6

Please sign in to comment.