Skip to content

Commit

Permalink
Merge #283
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
3 people authored Dec 1, 2022
2 parents 1adee5f + 74fc8b8 commit 8a9ff04
Show file tree
Hide file tree
Showing 9 changed files with 123 additions and 125 deletions.
81 changes: 1 addition & 80 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,7 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=print-statement,
parameter-unpacking,
unpacking-in-except,
old-raise-syntax,
backtick,
long-suffix,
old-ne-operator,
old-octal-literal,
import-star-module-level,
non-ascii-bytes-literal,
disable=
raw-checker-failed,
bad-inline-option,
locally-disabled,
Expand All @@ -78,69 +69,7 @@ disable=print-statement,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
apply-builtin,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
execfile-builtin,
file-builtin,
long-builtin,
raw_input-builtin,
reduce-builtin,
standarderror-builtin,
unicode-builtin,
xrange-builtin,
coerce-method,
delslice-method,
getslice-method,
setslice-method,
no-absolute-import,
old-division,
dict-iter-method,
dict-view-method,
next-method-called,
metaclass-assignment,
indexing-exception,
raising-string,
reload-builtin,
oct-method,
hex-method,
nonzero-method,
cmp-method,
input-builtin,
round-builtin,
intern-builtin,
unichr-builtin,
map-builtin-not-iterating,
zip-builtin-not-iterating,
range-builtin-not-iterating,
filter-builtin-not-iterating,
using-cmp-argument,
eq-without-hash,
div-method,
idiv-method,
rdiv-method,
exception-message-attribute,
invalid-str-codec,
sys-max-int,
bad-python3-import,
deprecated-string-function,
deprecated-str-translate-call,
deprecated-itertools-function,
deprecated-types-field,
next-method-defined,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
deprecated-operator-function,
deprecated-urllib-function,
xreadlines-attribute,
deprecated-sys-function,
exception-escape,
comprehension-escape,
arguments-differ,
bad-continuation,
broad-except,
consider-using-in,
dangerous-default-value,
Expand All @@ -152,7 +81,6 @@ disable=print-statement,
literal-comparison,
missing-docstring,
no-else-return,
no-self-use,
pointless-string-statement,
protected-access,
redefined-builtin,
Expand Down Expand Up @@ -364,13 +292,6 @@ max-line-length=120
# Maximum number of lines in a module.
max-module-lines=1000

# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,
dict-separator

# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
Expand Down
3 changes: 2 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ requests = "==2.28.1"

[dev-packages]
pytest = "==7.1.3"
pylint = "==2.8.2"
pylint = "==2.15.7"
tox = "==3.27.1"
tox-pipenv = "==1.10.1"
wrapt = "*"
135 changes: 107 additions & 28 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions scraper/src/config/browser_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ def init(config_original_content, js_render, user_agent):
chrome_options = Options()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--headless')
chrome_options.add_argument('user-agent={0}'.format(user_agent))
chrome_options.add_argument(f'user-agent={user_agent}')

CHROMEDRIVER_PATH = os.environ.get('CHROMEDRIVER_PATH',
"/usr/bin/chromedriver")
if not os.path.isfile(CHROMEDRIVER_PATH):
raise Exception(
"Env CHROMEDRIVER_PATH='{}' is not a path to a file".format(
CHROMEDRIVER_PATH))
f"Env CHROMEDRIVER_PATH='{CHROMEDRIVER_PATH}' is not a path to a file")
driver = webdriver.Chrome(
CHROMEDRIVER_PATH,
options=chrome_options)
Expand Down
4 changes: 2 additions & 2 deletions scraper/src/config/config_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ConfigLoader:
stop_content = []
strategy = 'default'
strict_redirect = True
strip_chars = u".,;:§¶"
strip_chars = ".,;:§¶"
use_anchors = False
user_agent = 'Meilisearch docs-scraper'
only_content_level = False
Expand Down Expand Up @@ -90,7 +90,7 @@ def __init__(self, config):
def _load_config(self, config):
if os.path.isfile(config):
self.config_file = config
with open(self.config_file, 'r') as f:
with open(self.config_file, mode='r', encoding='utf-8') as f:
config = f.read()

try:
Expand Down
3 changes: 1 addition & 2 deletions scraper/src/documentation_spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ def add_records(self, response, from_sitemap):
# Arbitrary limit
if self.nb_hits_max > 0 and DocumentationSpider.NB_INDEXED > self.nb_hits_max:
DocumentationSpider.NB_INDEXED = 0
self.reason_to_stop = "Too much hits, Docs-Scraper only handle {} records".format(
int(self.nb_hits_max))
self.reason_to_stop = f"Too much hits, Docs-Scraper only handle {int(self.nb_hits_max)} records"
raise ValueError(self.reason_to_stop)

def parse_from_sitemap(self, response):
Expand Down
Loading

0 comments on commit 8a9ff04

Please sign in to comment.