Skip to content

Commit

Permalink
chore: Ignore ruff false positive
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Feb 5, 2025
1 parent 780fcab commit eec80a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default_language_version:
python: python3.10
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.4
hooks:
- id: ruff
- repo: https://github.com/astral-sh/uv-pre-commit
Expand Down
3 changes: 1 addition & 2 deletions kingfisher_scrapy/base_spiders/base_spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ def build_file_from_response(self, response, /, *, data_type, **kwargs):
if 'data' not in kwargs:
body = response.body
# https://tools.ietf.org/html/rfc7159#section-8.1
# bytes instances don't have a removeprefix method.
if body.startswith(codecs.BOM_UTF8):
if body.startswith(codecs.BOM_UTF8): # noqa: FURB188 # bytes instances don't have a removeprefix method.
body = body[len(codecs.BOM_UTF8):]
kwargs['data'] = body
return self.build_file(data_type=data_type, **kwargs)
Expand Down

0 comments on commit eec80a4

Please sign in to comment.