Skip to content

Commit

Permalink
Format fasthttp.py to conform with coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterKey-Pro committed Jan 8, 2025
1 parent f2c1ced commit 9d9c2e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions locust/contrib/fasthttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,11 @@ def iter_lines(self, url: str, **kwargs) -> Generator[str, None, None]:
"""Sends a iter_lines request"""
response = self.request("GET", url, stream=True, **kwargs)
response.raise_for_status()
buffer = ''
buffer = ""
for chunk in response.iter_content(chunk_size=1024):
buffer += chunk.decode('utf-8')
while '\n' in buffer:
line, buffer = buffer.split('\n', 1)
buffer += chunk.decode("utf-8")
while "\n" in buffer:
line, buffer = buffer.split("\n", 1)
yield line

def head(self, url: str, **kwargs: Unpack[RESTKwargs]) -> ResponseContextManager | FastResponse:
Expand Down

0 comments on commit 9d9c2e1

Please sign in to comment.