mirror of
https://github.com/instaloader/instaloader.git
synced 2024-08-17 20:29:38 +02:00
Disable pylint invalid-name message in travis
This commit is contained in:
parent
938e029592
commit
4153bf27a9
@ -8,7 +8,7 @@ install:
|
|||||||
- pip install pylint requests
|
- pip install pylint requests
|
||||||
- pip install -r docs/requirements.txt
|
- pip install -r docs/requirements.txt
|
||||||
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,too-many-locals,too-many-branches,too-many-statements,inconsistent-return-statements 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,inconsistent-return-statements,invalid-name instaloader
|
||||||
- make -C docs html
|
- make -C docs html
|
||||||
deploy:
|
deploy:
|
||||||
- provider: pypi
|
- provider: pypi
|
||||||
|
@ -151,7 +151,7 @@ def filterstr_to_filterfunc(filter_str: str, logged_in: bool) -> Callable[['Post
|
|||||||
|
|
||||||
class TransformFilterAst(ast.NodeTransformer):
|
class TransformFilterAst(ast.NodeTransformer):
|
||||||
def visit_Name(self, node: ast.Name):
|
def visit_Name(self, node: ast.Name):
|
||||||
# pylint:disable=invalid-name,no-self-use
|
# pylint:disable=no-self-use
|
||||||
if not isinstance(node.ctx, ast.Load):
|
if not isinstance(node.ctx, ast.Load):
|
||||||
raise InvalidArgumentException("Invalid filter: Modifying variables ({}) not allowed.".format(node.id))
|
raise InvalidArgumentException("Invalid filter: Modifying variables ({}) not allowed.".format(node.id))
|
||||||
if not hasattr(Post, node.id):
|
if not hasattr(Post, node.id):
|
||||||
@ -248,7 +248,6 @@ class Post:
|
|||||||
|
|
||||||
def _field(self, *keys) -> Any:
|
def _field(self, *keys) -> Any:
|
||||||
"""Lookups given fields in _node, and if not found in _full_metadata. Raises KeyError if not found anywhere."""
|
"""Lookups given fields in _node, and if not found in _full_metadata. Raises KeyError if not found anywhere."""
|
||||||
# pylint:disable=invalid-name
|
|
||||||
try:
|
try:
|
||||||
d = self._node
|
d = self._node
|
||||||
for key in keys:
|
for key in keys:
|
||||||
@ -1018,7 +1017,6 @@ class Instaloader:
|
|||||||
# if unique_comments_list[-1]['id'] != comment['id']:
|
# if unique_comments_list[-1]['id'] != comment['id']:
|
||||||
# unique_comments_list.append(comment)
|
# unique_comments_list.append(comment)
|
||||||
#file.write(json.dumps(unique_comments_list, indent=4))
|
#file.write(json.dumps(unique_comments_list, indent=4))
|
||||||
#pylint:disable=invalid-name
|
|
||||||
for x, y in zip(comments_list[:-1], comments_list[1:]):
|
for x, y in zip(comments_list[:-1], comments_list[1:]):
|
||||||
if x['id'] != y['id']:
|
if x['id'] != y['id']:
|
||||||
unique_comments_list.append(y)
|
unique_comments_list.append(y)
|
||||||
|
Loading…
Reference in New Issue
Block a user