1
0
mirror of https://github.com/instaloader/instaloader.git synced 2024-11-09 03:42:31 +01:00

Disable some trolling pylint features

This commit is contained in:
André Koch-Kramer 2017-07-27 22:26:33 +02:00
parent 7cac6d53f2
commit 1699954761
2 changed files with 1 additions and 6 deletions

View File

@ -9,4 +9,4 @@ python:
install: install:
- pip install pylint requests - pip install pylint requests
script: script:
- python3 -m pylint -r n -d bad-whitespace,missing-docstring,too-many-arguments,locally-disabled,line-too-long,too-many-public-methods,too-many-lines,too-many-instance-attributes instaloader - python3 -m pylint -r n -d bad-whitespace,missing-docstring,too-many-arguments,locally-disabled,line-too-long,too-many-public-methods,too-many-lines,too-many-instance-attributes,too-many-locals,too-many-branches,too-many-statements instaloader

View File

@ -375,7 +375,6 @@ class Instaloader:
def save_caption(self, filename: str, date_epoch: float, caption: str) -> None: def save_caption(self, filename: str, date_epoch: float, caption: str) -> None:
"""Updates picture caption""" """Updates picture caption"""
# pylint:disable=too-many-branches
filename += '.txt' filename += '.txt'
pcaption = caption.replace('\n', ' ').strip() pcaption = caption.replace('\n', ' ').strip()
caption = caption.encode("UTF-8") caption = caption.encode("UTF-8")
@ -561,7 +560,6 @@ class Instaloader:
:param download_comments: Update comments :param download_comments: Update comments
:return: True if something was downloaded, False otherwise, i.e. file was already there :return: True if something was downloaded, False otherwise, i.e. file was already there
""" """
# pylint:disable=too-many-branches,too-many-locals,too-many-statements
already_has_profilename = profile is not None or ('owner' in node and 'username' in node['owner']) already_has_profilename = profile is not None or ('owner' in node and 'username' in node['owner'])
needs_profilename = (format_string_contains_key(self.dirname_pattern, 'profile') or needs_profilename = (format_string_contains_key(self.dirname_pattern, 'profile') or
format_string_contains_key(self.filename_pattern, 'profile')) format_string_contains_key(self.filename_pattern, 'profile'))
@ -737,7 +735,6 @@ class Instaloader:
:param geotags: Download geotags :param geotags: Download geotags
:param download_comments: Update comments :param download_comments: Update comments
""" """
# pylint:disable=too-many-locals
data = self.get_feed_json() data = self.get_feed_json()
count = 1 count = 1
while True: while True:
@ -866,7 +863,6 @@ class Instaloader:
profile_pic_only: bool = False, download_videos: bool = True, geotags: bool = False, profile_pic_only: bool = False, download_videos: bool = True, geotags: bool = False,
download_comments: bool = False, fast_update: bool = False) -> None: download_comments: bool = False, fast_update: bool = False) -> None:
"""Download one profile""" """Download one profile"""
# pylint:disable=too-many-branches,too-many-locals
# Get profile main page json # Get profile main page json
data = self.get_json(name) data = self.get_json(name)
# check if profile does exist or name has changed since last download # check if profile does exist or name has changed since last download
@ -932,7 +928,6 @@ class Instaloader:
download_comments: bool = False, download_comments: bool = False,
fast_update: bool = False) -> None: fast_update: bool = False) -> None:
"""Download set of profiles and handle sessions""" """Download set of profiles and handle sessions"""
# pylint:disable=too-many-branches,too-many-locals,too-many-statements
# Login, if desired # Login, if desired
if username is not None: if username is not None:
try: try: