From cb55034b4253044a8194d4b96b4047f71c467e0f Mon Sep 17 00:00:00 2001 From: Siddhesh Nachane Date: Sat, 31 Mar 2018 22:51:34 +0530 Subject: [PATCH] Made basic fixes 1. Corrected Comments and DocStrings Spell Errors. 2. Added .vscode folder to .gitignore 3. Replaced `i` with place holder `_` (as i is never used) --- .gitignore | 5 ++++- requests_html.py | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 52793b4..3f3912c 100644 --- a/.gitignore +++ b/.gitignore @@ -103,4 +103,7 @@ venv.bak/ /site # mypy -.mypy_cache/ \ No newline at end of file +.mypy_cache/ + +# Visual Studio Code +.vscode \ No newline at end of file diff --git a/requests_html.py b/requests_html.py index ea8f3bd..df612cc 100644 --- a/requests_html.py +++ b/requests_html.py @@ -569,14 +569,14 @@ class HTML(BaseParser): except TimeoutError: return None - self.session.browser # Automatycally create a event loop and browser + self.session.browser # Automatically create a event loop and browser content = None # Automatically set Reload to False, if example URL is being used. if self.url == DEFAULT_URL: reload = False - for i in range(retries): + for _ in range(retries): if not content: try: @@ -694,7 +694,7 @@ class AsyncHTMLSession(requests.Session): mock_browser: bool = True, *args, **kwargs): """ Set or create an event loop and a thread pool. - :param loop: Asyncio lopp to use. + :param loop: Asyncio loop to use. :param workers: Amount of threads to use for executing async calls. If not pass it will default to the number of processors on the machine, multiplied by 5. """