Skip to content

Commit 8a9ff04

Browse files
meili-bors[bot]dependabot[bot]bidoubiwa
authored
Merge #283
283: Bump pylint from 2.8.2 to 2.15.7 r=bidoubiwa a=dependabot[bot] Bumps [pylint](https://github.com/PyCQA/pylint) from 2.8.2 to 2.15.7. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/PyCQA/pylint/commit/5a96370ff556fd71cc228ccb5c26b70e55041028"><code>5a96370</code></a> Bump pylint to 2.15.7, update changelog (<a href="https://github-redirect.dependabot.com/PyCQA/pylint/issues/7845">#7845</a>)</li> <li><a href="https://github.com/PyCQA/pylint/commit/43109b69ccc005120f701f9a1b1bd96d60f382db"><code>43109b6</code></a> Revert &quot;Fix crash when using <code>enumerate</code> with <code>start</code> and a class attribu...</li> <li><a href="https://github.com/PyCQA/pylint/commit/ff732826c5aa88854c275104283fd334a1d7aef8"><code>ff73282</code></a> Fix <code>logging-fstring-interpolation</code> false positive (<a href="https://github-redirect.dependabot.com/PyCQA/pylint/issues/7846">#7846</a>) (<a href="https://github-redirect.dependabot.com/PyCQA/pylint/issues/7854">#7854</a>)</li> <li><a href="https://github.com/PyCQA/pylint/commit/86b8c649061f49c7d121843675ceefe6ff3a8113"><code>86b8c64</code></a> Fix crash when using <code>enumerate</code> with <code>start</code> and a class attribute (<a href="https://github-redirect.dependabot.com/PyCQA/pylint/issues/7824">#7824</a>)</li> <li><a href="https://github.com/PyCQA/pylint/commit/ebf282437ece32158991fbcfd562797cc9ff7e10"><code>ebf2824</code></a> Execute tests on maintenance branche's PR</li> <li><a href="https://github.com/PyCQA/pylint/commit/9ec1aa04d37fe7be4c99b9315cd79e8a7e347c3d"><code>9ec1aa0</code></a> Do not crash if next() is called without arguments (<a href="https://github-redirect.dependabot.com/PyCQA/pylint/issues/7831">#7831</a>)</li> <li><a href="https://github.com/PyCQA/pylint/commit/ac2da871efa162e0f5037e589614219f7fec7631"><code>ac2da87</code></a> Upgrade the versions of astroid and dill (<a href="https://github-redirect.dependabot.com/PyCQA/pylint/issues/7838">#7838</a>)</li> <li><a href="https://github.com/PyCQA/pylint/commit/06d5d1a157ffda7207bda1b2c8410b4c63334f11"><code>06d5d1a</code></a> Add <code>content: write</code> rights for backporting job (<a href="https://github-redirect.dependabot.com/PyCQA/pylint/issues/7826">#7826</a>)</li> <li><a href="https://github.com/PyCQA/pylint/commit/df5ebb543c65e87fb471b0e6ba1a630ce19e65d7"><code>df5ebb5</code></a> Fix <code>used-before-assignment</code> for variable annotations guarded by TYPE_CHECKIN...</li> <li><a href="https://github.com/PyCQA/pylint/commit/1baf4be15e29a06088b425eb5f9ecafd50cd5e6a"><code>1baf4be</code></a> Deduplicate module file paths to prevent redundant scans. (<a href="https://github-redirect.dependabot.com/PyCQA/pylint/issues/7747">#7747</a>)</li> <li>Additional commits viewable in <a href="https://github.com/PyCQA/pylint/compare/v2.8.2...v2.15.7">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pylint&package-manager=pip&previous-version=2.8.2&new-version=2.15.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Charlotte Vermandel <charlottevermandel@gmail.com>
2 parents 1adee5f + 74fc8b8 commit 8a9ff04

File tree

9 files changed

+123
-125
lines changed

9 files changed

+123
-125
lines changed

.pylintrc

Lines changed: 1 addition & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,7 @@ confidence=
6060
# --enable=similarities". If you want to run only the classes checker, but have
6161
# no Warning level messages displayed, use "--disable=all --enable=classes
6262
# --disable=W".
63-
disable=print-statement,
64-
parameter-unpacking,
65-
unpacking-in-except,
66-
old-raise-syntax,
67-
backtick,
68-
long-suffix,
69-
old-ne-operator,
70-
old-octal-literal,
71-
import-star-module-level,
72-
non-ascii-bytes-literal,
63+
disable=
7364
raw-checker-failed,
7465
bad-inline-option,
7566
locally-disabled,
@@ -78,69 +69,7 @@ disable=print-statement,
7869
useless-suppression,
7970
deprecated-pragma,
8071
use-symbolic-message-instead,
81-
apply-builtin,
82-
basestring-builtin,
83-
buffer-builtin,
84-
cmp-builtin,
85-
coerce-builtin,
86-
execfile-builtin,
87-
file-builtin,
88-
long-builtin,
89-
raw_input-builtin,
90-
reduce-builtin,
91-
standarderror-builtin,
92-
unicode-builtin,
93-
xrange-builtin,
94-
coerce-method,
95-
delslice-method,
96-
getslice-method,
97-
setslice-method,
98-
no-absolute-import,
99-
old-division,
100-
dict-iter-method,
101-
dict-view-method,
102-
next-method-called,
103-
metaclass-assignment,
104-
indexing-exception,
105-
raising-string,
106-
reload-builtin,
107-
oct-method,
108-
hex-method,
109-
nonzero-method,
110-
cmp-method,
111-
input-builtin,
112-
round-builtin,
113-
intern-builtin,
114-
unichr-builtin,
115-
map-builtin-not-iterating,
116-
zip-builtin-not-iterating,
117-
range-builtin-not-iterating,
118-
filter-builtin-not-iterating,
119-
using-cmp-argument,
120-
eq-without-hash,
121-
div-method,
122-
idiv-method,
123-
rdiv-method,
124-
exception-message-attribute,
125-
invalid-str-codec,
126-
sys-max-int,
127-
bad-python3-import,
128-
deprecated-string-function,
129-
deprecated-str-translate-call,
130-
deprecated-itertools-function,
131-
deprecated-types-field,
132-
next-method-defined,
133-
dict-items-not-iterating,
134-
dict-keys-not-iterating,
135-
dict-values-not-iterating,
136-
deprecated-operator-function,
137-
deprecated-urllib-function,
138-
xreadlines-attribute,
139-
deprecated-sys-function,
140-
exception-escape,
141-
comprehension-escape,
14272
arguments-differ,
143-
bad-continuation,
14473
broad-except,
14574
consider-using-in,
14675
dangerous-default-value,
@@ -152,7 +81,6 @@ disable=print-statement,
15281
literal-comparison,
15382
missing-docstring,
15483
no-else-return,
155-
no-self-use,
15684
pointless-string-statement,
15785
protected-access,
15886
redefined-builtin,
@@ -364,13 +292,6 @@ max-line-length=120
364292
# Maximum number of lines in a module.
365293
max-module-lines=1000
366294

367-
# List of optional constructs for which whitespace checking is disabled. `dict-
368-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
369-
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
370-
# `empty-line` allows space-only lines.
371-
no-space-check=trailing-comma,
372-
dict-separator
373-
374295
# Allow the body of a class to be on the same line as the declaration if body
375296
# contains single statement.
376297
single-line-class-stmt=no

Pipfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ requests = "==2.28.1"
1313

1414
[dev-packages]
1515
pytest = "==7.1.3"
16-
pylint = "==2.8.2"
16+
pylint = "==2.15.7"
1717
tox = "==3.27.1"
1818
tox-pipenv = "==1.10.1"
19+
wrapt = "*"

Pipfile.lock

Lines changed: 107 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scraper/src/config/browser_handler.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ def init(config_original_content, js_render, user_agent):
2424
chrome_options = Options()
2525
chrome_options.add_argument('--no-sandbox')
2626
chrome_options.add_argument('--headless')
27-
chrome_options.add_argument('user-agent={0}'.format(user_agent))
27+
chrome_options.add_argument(f'user-agent={user_agent}')
2828

2929
CHROMEDRIVER_PATH = os.environ.get('CHROMEDRIVER_PATH',
3030
"/usr/bin/chromedriver")
3131
if not os.path.isfile(CHROMEDRIVER_PATH):
3232
raise Exception(
33-
"Env CHROMEDRIVER_PATH='{}' is not a path to a file".format(
34-
CHROMEDRIVER_PATH))
33+
f"Env CHROMEDRIVER_PATH='{CHROMEDRIVER_PATH}' is not a path to a file")
3534
driver = webdriver.Chrome(
3635
CHROMEDRIVER_PATH,
3736
options=chrome_options)

scraper/src/config/config_loader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ConfigLoader:
4242
stop_content = []
4343
strategy = 'default'
4444
strict_redirect = True
45-
strip_chars = u".,;:§¶"
45+
strip_chars = ".,;:§¶"
4646
use_anchors = False
4747
user_agent = 'Meilisearch docs-scraper'
4848
only_content_level = False
@@ -90,7 +90,7 @@ def __init__(self, config):
9090
def _load_config(self, config):
9191
if os.path.isfile(config):
9292
self.config_file = config
93-
with open(self.config_file, 'r') as f:
93+
with open(self.config_file, mode='r', encoding='utf-8') as f:
9494
config = f.read()
9595

9696
try:

scraper/src/documentation_spider.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ def add_records(self, response, from_sitemap):
156156
# Arbitrary limit
157157
if self.nb_hits_max > 0 and DocumentationSpider.NB_INDEXED > self.nb_hits_max:
158158
DocumentationSpider.NB_INDEXED = 0
159-
self.reason_to_stop = "Too much hits, Docs-Scraper only handle {} records".format(
160-
int(self.nb_hits_max))
159+
self.reason_to_stop = f"Too much hits, Docs-Scraper only handle {int(self.nb_hits_max)} records"
161160
raise ValueError(self.reason_to_stop)
162161

163162
def parse_from_sitemap(self, response):

0 commit comments

Comments
 (0)