m-burst / pylint-requests Goto Github PK
View Code? Open in Web Editor NEWA pylint plugin to check for common issues with usage of requests
License: MIT License
A pylint plugin to check for common issues with usage of requests
License: MIT License
I successfully installed this package using pip install pylint-requests
but when I run:
pylint --load-plugins=pylint-requests /workspaces/codespaces-blank/test.py
I get the following error:
`@deadex-ng โ /workspaces/codespaces-blank/files $ pylint --load-plugins=pylint-requests /workspaces/codespaces-blank/test.py
************* Module Command line or configuration file
Command line or configuration file:1:0: E0013: Plugin 'pylint-requests' is impossible to load, is it installed ? ('No module named 'pylint-requests'') (bad-plugin-value)
************* Module test
/workspaces/codespaces-blank/test.py:3:0: C0303: Trailing whitespace (trailing-whitespace)
/workspaces/codespaces-blank/test.py:4:0: C0304: Final newline missing (missing-final-newline)
/workspaces/codespaces-blank/test.py:1:0: C0114: Missing module docstring (missing-module-docstring)
Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)
@deadex-ng โ /workspaces/codespaces-blank/files $ `
The pylint-requests
plugin should be able load with no errors.
I have a problem with pylint-requests crashing in 1500 lines python file. I've tries to run in PyCharm debugger, but i have an error __main__.py: error: no such option: --multiproc
. I don't know how to reproduce this bug without pasting 1500 lines of our code. Posting it here so maybe someone else will be able to reproduce it. For now I've forked this project to our private repo and added try-except to ignore astroid.exceptions.AttributeInferenceError (it fails at one file only).
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/Cellar/[email protected]/3.8.2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint/__main__.py", line 18, in <module>
pylint.run_pylint()
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint/__init__.py", line 22, in run_pylint
PylintRun(sys.argv[1:])
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint/lint/run.py", line 338, in __init__
linter.check(args)
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 870, in check
self._check_files(
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 904, in _check_files
self._check_file(get_ast, check_astroid_module, name, filepath, modname)
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 930, in _check_file
check_astroid_module(ast_node)
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 1062, in check_astroid_module
retval = self._check_astroid_module(
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint/lint/pylinter.py", line 1107, in _check_astroid_module
walker.walk(ast_node)
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint/utils/ast_walker.py", line 75, in walk
self.walk(child)
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint/utils/ast_walker.py", line 75, in walk
self.walk(child)
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint/utils/ast_walker.py", line 75, in walk
self.walk(child)
[Previous line repeated 2 more times]
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint/utils/ast_walker.py", line 72, in walk
callback(astroid)
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint_requests/checkers/timeout.py", line 26, in visit_call
if not is_requests_func(node.func):
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint_requests/utils.py", line 121, in is_requests_func
) or is_requests_session(node.expr):
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint_requests/utils.py", line 84, in is_requests_session
assigns = _lookup(node)
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/pylint_requests/utils.py", line 65, in _lookup
return obj.getattr(node.attrname)
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/astroid/bases.py", line 190, in getattr
return self._proxied.getattr(name, context, class_context=False)
File "/Users/user/company/app_name/venv/lib/python3.8/site-packages/astroid/scoped_nodes.py", line 2455, in getattr
raise exceptions.AttributeInferenceError(
astroid.exceptions.AttributeInferenceError: 'META' not found on <ClassDef.NoneType l.0 at 0x10dc9ca30>.
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.