Skip to content

Commit b6381ee

Browse files
authored
Bump tool versions (#288)
1 parent 618ad9f commit b6381ee

File tree

11 files changed

+23
-21
lines changed

11 files changed

+23
-21
lines changed

.github/workflows/checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- python-version: "3.12"
1515
env:
1616
TOXENV: pylint
17-
- python-version: "3.11" # Keep in sync with .readthedocs.yml
17+
- python-version: "3.12"
1818
env:
1919
TOXENV: docs
2020
- python-version: "3.12"
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v4
2929

3030
- name: Set up Python ${{ matrix.python-version }}
31-
uses: actions/setup-python@v4
31+
uses: actions/setup-python@v5
3232
with:
3333
python-version: ${{ matrix.python-version }}
3434

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v4
1111

1212
- name: Set up Python 3.12
13-
uses: actions/setup-python@v4
13+
uses: actions/setup-python@v5
1414
with:
1515
python-version: "3.12"
1616

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
sudo apt-get install libxml2-dev libxslt-dev
3838
3939
- name: Set up Python ${{ matrix.python-version }}
40-
uses: actions/setup-python@v4
40+
uses: actions/setup-python@v5
4141
with:
4242
python-version: ${{ matrix.python-version }}
4343

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/PyCQA/bandit
3-
rev: 1.7.7
3+
rev: 1.7.8
44
hooks:
55
- id: bandit
66
args: [-r, -c, .bandit.yml]
@@ -9,10 +9,10 @@ repos:
99
hooks:
1010
- id: flake8
1111
- repo: https://github.com/psf/black.git
12-
rev: 24.1.1
12+
rev: 24.2.0
1313
hooks:
1414
- id: black
1515
- repo: https://github.com/pycqa/isort
1616
rev: 5.13.2
1717
hooks:
18-
- id: isort
18+
- id: isort

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build:
88
tools:
99
# For available versions, see:
1010
# https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python
11-
python: "3.11" # Keep in sync with .github/workflows/checks.yml
11+
python: "3.12" # Keep in sync with .github/workflows/checks.yml
1212
python:
1313
install:
1414
- requirements: docs/requirements.txt

parsel/csstranslator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def xpath_pseudo_element(
9595
method = getattr(self, method_name, None)
9696
if not method:
9797
raise ExpressionError(
98-
f"The functional pseudo-element ::{pseudo_element.name}() is unknown" # noqa: E231
98+
f"The functional pseudo-element ::{pseudo_element.name}() is unknown"
9999
)
100100
xpath = method(xpath, pseudo_element)
101101
else:
@@ -105,7 +105,7 @@ def xpath_pseudo_element(
105105
method = getattr(self, method_name, None)
106106
if not method:
107107
raise ExpressionError(
108-
f"The pseudo-element ::{pseudo_element} is unknown" # noqa: E231
108+
f"The pseudo-element ::{pseudo_element} is unknown"
109109
)
110110
xpath = method(xpath)
111111
return xpath
@@ -116,7 +116,7 @@ def xpath_attr_functional_pseudo_element(
116116
"""Support selecting attribute values using ::attr() pseudo-element"""
117117
if function.argument_types() not in (["STRING"], ["IDENT"]):
118118
raise ExpressionError(
119-
f"Expected a single string or ident for ::attr(), got {function.arguments!r}" # noqa: E231
119+
f"Expected a single string or ident for ::attr(), got {function.arguments!r}"
120120
)
121121
return XPathExpr.from_xpath(xpath, attribute=function.arguments[0].value)
122122

parsel/selector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from .utils import extract_regex, flatten, iflatten, shorten
3131

3232
_SelectorType = TypeVar("_SelectorType", bound="Selector")
33-
_ParserType = Union[etree.XMLParser, etree.HTMLParser]
33+
_ParserType = Union[etree.XMLParser, etree.HTMLParser] # type: ignore[type-arg]
3434
# simplified _OutputMethodArg from types-lxml
3535
_TostringMethodType = Literal[
3636
"html",

parsel/xpathfuncs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def set_xpathfunc(fname: str, func: Optional[Callable]) -> None: # type: ignore
2222
.. _`in lxml documentation`: https://lxml.de/extensions.html#xpath-extension-functions
2323
2424
"""
25-
ns_fns = etree.FunctionNamespace(None) # type: ignore[attr-defined]
25+
ns_fns = etree.FunctionNamespace(None)
2626
if func is not None:
2727
ns_fns[fname] = func
2828
else:

pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ disable=c-extension-no-member,
1515
no-else-return,
1616
no-member,
1717
parse-error,
18+
protected-access,
1819
raise-missing-from,
1920
redefined-builtin,
2021
too-few-public-methods,

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
version="1.8.1",
1414
description="Parsel is a library to extract data from HTML and XML using XPath and CSS selectors",
1515
long_description=readme + "\n\n" + history,
16+
long_description_content_type="text/x-rst",
1617
author="Scrapy project",
1718
author_email="[email protected]",
1819
url="https://github.com/scrapy/parsel",

0 commit comments

Comments
 (0)