Skip to content

Commit 179fa68

Browse files
authored
Merge branch 'master' into query-separator
2 parents e9e72d6 + 101d438 commit 179fa68

File tree

23 files changed

+1891
-1245
lines changed

23 files changed

+1891
-1245
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ jobs:
2727
- python-version: 3.9
2828
env:
2929
TOXENV: security
30+
- python-version: 3.9
31+
env:
32+
TOXENV: black
33+
- python-version: 3.9
34+
env:
35+
TOXENV: typing
3036

3137
steps:
3238
- uses: actions/checkout@v2

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ _trial_temp
1010
.coverage
1111
coverage.xml
1212
.cache
13+
.mypy_cache/
14+
/index.txt
15+
.dmypy.json
16+
.hypothesis/

conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ def pytest_collection_modifyitems(session, config, items):
55
# Avoid executing tests when executing `--flake8` flag (pytest-flake8)
66
try:
77
from pytest_flake8 import Flake8Item
8-
if config.getoption('--flake8'):
8+
9+
if config.getoption("--flake8"):
910
items[:] = [item for item in items if isinstance(item, Flake8Item)]
1011
except ImportError:
1112
pass

docs/w3lib.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ w3lib Package
2626

2727
.. automodule:: w3lib.url
2828
:members:
29+
30+
.. autoclass:: ParseDataURIResult
31+
:members:

mypy.ini

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[mypy]
2+
exclude = .*flycheck_.*
3+
show_error_codes = True
4+
check_untyped_defs = True
5+
6+
[mypy-w3lib.*]
7+
# All non-tests functions must be typed.
8+
disallow_untyped_defs = True
9+
10+
[mypy-tests.*]
11+
# Allow test functions to be untyped
12+
disallow_untyped_defs = False

pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ disable=bad-continuation,
2525
redefined-outer-name,
2626
too-many-arguments,
2727
too-many-branches,
28+
too-many-lines,
2829
too-many-public-methods,
2930
trailing-comma-tuple,
3031
trailing-newlines,

pytest.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
[pytest]
22
doctest_optionflags = ALLOW_UNICODE ALLOW_BYTES
3+
flake8-max-line-length = 88
34
flake8-ignore =
45
W503 # https://www.flake8rules.com/rules/W503.html
6+
E203 # https://www.flake8rules.com/rules/E203.html
57

6-
docs/conf.py E121 E122 E265 E401 E501
8+
docs/conf.py E121 E122 E265 E401
79
tests/test_encoding.py E128 E221 E241 E302 E401 E501 E731
8-
tests/test_form.py E265 E501
10+
tests/test_form.py E265
911
tests/test_html.py E123 E128 E241 E303 E501 E502
1012
tests/test_http.py E128 E261 E302 W291
1113
tests/test_url.py E126 E127 E128 E226 E261 E303 E501 W293 W391

setup.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@
22

33

44
setup(
5-
name='w3lib',
6-
version='1.22.0',
7-
license='BSD',
8-
description='Library of web-related functions',
9-
author='Scrapy project',
10-
author_email='[email protected]',
11-
url='https://github.com/scrapy/w3lib',
12-
packages=find_packages(exclude=('tests', 'tests.*')),
5+
name="w3lib",
6+
version="1.22.0",
7+
license="BSD",
8+
description="Library of web-related functions",
9+
author="Scrapy project",
10+
author_email="[email protected]",
11+
url="https://github.com/scrapy/w3lib",
12+
packages=find_packages(exclude=("tests", "tests.*")),
1313
include_package_data=True,
1414
zip_safe=False,
15-
platforms=['Any'],
15+
platforms=["Any"],
1616
classifiers=[
17-
'Development Status :: 5 - Production/Stable',
18-
'License :: OSI Approved :: BSD License',
19-
'Operating System :: OS Independent',
20-
'Programming Language :: Python',
21-
'Programming Language :: Python :: 3',
22-
'Programming Language :: Python :: 3.6',
23-
'Programming Language :: Python :: 3.7',
24-
'Programming Language :: Python :: 3.8',
25-
'Programming Language :: Python :: 3.9',
26-
'Programming Language :: Python :: Implementation :: CPython',
27-
'Programming Language :: Python :: Implementation :: PyPy',
28-
'Topic :: Internet :: WWW/HTTP',
17+
"Development Status :: 5 - Production/Stable",
18+
"License :: OSI Approved :: BSD License",
19+
"Operating System :: OS Independent",
20+
"Programming Language :: Python",
21+
"Programming Language :: Python :: 3",
22+
"Programming Language :: Python :: 3.6",
23+
"Programming Language :: Python :: 3.7",
24+
"Programming Language :: Python :: 3.8",
25+
"Programming Language :: Python :: 3.9",
26+
"Programming Language :: Python :: Implementation :: CPython",
27+
"Programming Language :: Python :: Implementation :: PyPy",
28+
"Topic :: Internet :: WWW/HTTP",
2929
],
3030
)

0 commit comments

Comments
 (0)