Skip to content

Commit 758276b

Browse files
committed
Fix sphinx/build_docs warnings for web_programming
1 parent 215dfa2 commit 758276b

File tree

3 files changed

+33
-26
lines changed

3 files changed

+33
-26
lines changed

web_programming/download_images_from_google_query.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,19 @@ def download_images_from_google_query(query: str = "dhaka", max_images: int = 5)
1818
Searches google using the provided query term and downloads the images in a folder.
1919
2020
Args:
21-
query : The image search term to be provided by the user. Defaults to
22-
"dhaka".
23-
image_numbers : [description]. Defaults to 5.
21+
* `query` : The image search term to be provided by the user. Defaults to ``dhaka``.
22+
* `max_images` : Maximum number of images. Defaults to ``5``.
2423
2524
Returns:
2625
The number of images successfully downloaded.
2726
28-
# Comment out slow (4.20s call) doctests
29-
# >>> download_images_from_google_query()
30-
5
31-
# >>> download_images_from_google_query("potato")
32-
5
27+
.. code-block:: python
28+
29+
# Comment out slow (4.20s call) doctests
30+
# >>> download_images_from_google_query()
31+
5
32+
# >>> download_images_from_google_query("potato")
33+
5
3334
"""
3435
max_images = min(max_images, 50) # Prevent abuse!
3536
params = {

web_programming/fetch_github_info.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
#!/usr/bin/env python3
22
"""
3-
Created by sarathkaul on 14/11/19
4-
Updated by lawric1 on 24/11/20
3+
| Created by sarathkaul on 14/11/19
4+
| Updated by lawric1 on 24/11/20
55
6-
Authentication will be made via access token.
7-
To generate your personal access token visit https://github.com/settings/tokens.
6+
| Authentication will be made via access token.
7+
| To generate your personal access token visit https://github.com/settings/tokens.
88
9-
NOTE:
10-
Never hardcode any credential information in the code. Always use an environment
11-
file to store the private information and use the `os` module to get the information
12-
during runtime.
9+
.. note::
10+
Never hardcode any credential information in the code. Always use an environment
11+
file to store the private information and use the ``os`` module to get the information
12+
during runtime.
1313
14-
Create a ".env" file in the root directory and write these two lines in that file
15-
with your token::
14+
Create a ``.env`` file in the root directory and write these two lines in that file
15+
with your token:
1616
17-
#!/usr/bin/env bash
18-
export USER_TOKEN=""
17+
.. code-block:: bash
18+
19+
#!/usr/bin/env bash
20+
export USER_TOKEN=""
1921
"""
2022

2123
from __future__ import annotations

web_programming/recaptcha_verification.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
"""
22
Recaptcha is a free captcha service offered by Google in order to secure websites and
3-
forms. At https://www.google.com/recaptcha/admin/create you can create new recaptcha
3+
forms. At https://www.google.com/recaptcha/admin/create you can create new recaptcha
44
keys and see the keys that your have already created.
5-
* Keep in mind that recaptcha doesn't work with localhost
6-
When you create a recaptcha key, your will get two separate keys: ClientKey & SecretKey.
7-
ClientKey should be kept in your site's front end
8-
SecretKey should be kept in your site's back end
95
10-
# An example HTML login form with recaptcha tag is shown below
6+
Keep in mind that recaptcha doesn't work with localhost
7+
8+
When you create a recaptcha key, your will get two separate keys: ClientKey & SecretKey:
9+
* ClientKey should be kept in your site's front end
10+
* SecretKey should be kept in your site's back end
11+
12+
An example HTML login form with recaptcha tag is shown below:
13+
14+
.. code-block:: html
1115
1216
<form action="" method="post">
1317
<h2 class="text-center">Log in</h2>

0 commit comments

Comments
 (0)