Skip to content

Commit 7f171df

Browse files
author
Birger Schacht
committed
DOCS: fix some sphinx warnings
This commit fixes various errors and warnings from sphinx, mostly due to wrong indents.
1 parent a87f3ca commit 7f171df

File tree

24 files changed

+205
-226
lines changed

24 files changed

+205
-226
lines changed

docs/dev/guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ Class name of the bot (ex: PhishTank Parser) must correspond to the type of the
295295

296296

297297
IntelMQ Data Format Rules
298-
========================
298+
=========================
299299

300300
Any component of IntelMQ MUST respect the IntelMQ Data Format.
301301

docs/user/intelmq-manager.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ When using distribution packages, the webserver configuration (which is also sho
2929
The webinterface is then available at ``http://localhost/intelmq-manager``.
3030

3131
Installation using pip
32-
^^^^^^^^^^^^^^^^^^^^^^
32+
======================
3333

3434
For installation via pip, the situation is more complex.
3535
``pip3 install intelmq-manager`` installs the HTML files in ``${PREFIX}/usr/share/intelmq-manager/html``.
@@ -80,7 +80,7 @@ Configuration
8080
In the file ``/usr/share/intelmq-manager/html/js/vars.js`` set ``ROOT`` to the URL of your ``intelmq-api`` installation- by default that's on the same host as ``intelmq-manager``.
8181

8282
CSP Headers
83-
==========
83+
===========
8484

8585
It is recommended to set these two headers for all requests:
8686

intelmq/bin/intelmqctl.py

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -977,29 +977,32 @@ def upgrade_conf(self, previous=None, dry_run=None, function=None,
977977
state_file: location of the state file
978978
no_backup: Do not create backups of state and configuration files
979979
980-
state file:
981-
982-
version_history = [..., [2, 0, 0], [2, 0, 1]]
983-
upgrades = {
984-
"v112_feodo_tracker_domains": true,
985-
"v112_feodo_tracker_ips": false,
986-
"v200beta1_ripe_expert": false
987-
}
988-
results = [
989-
{"function": "v112_feodo_tracker_domains",
990-
"success": true,
991-
"retval": null,
992-
"time": "..."},
993-
{"function": "v112_feodo_tracker_domains",
994-
"success": false,
995-
"retval": "fix it manually",
996-
"message": "fix it manually",
997-
"time": "..."},
998-
{"function": "v200beta1_ripe_expert",
999-
"success": false,
1000-
"traceback": "...",
1001-
"time": "..."}
1002-
]
980+
state_file:
981+
982+
.. code-block:: json
983+
984+
version_history = [..., [2, 0, 0], [2, 0, 1]]
985+
upgrades = {
986+
"v112_feodo_tracker_domains": true,
987+
"v112_feodo_tracker_ips": false,
988+
"v200beta1_ripe_expert": false
989+
}
990+
results = [
991+
{"function": "v112_feodo_tracker_domains",
992+
"success": true,
993+
"retval": null,
994+
"time": "..."},
995+
{"function": "v112_feodo_tracker_domains",
996+
"success": false,
997+
"retval": "fix it manually",
998+
"message": "fix it manually",
999+
"time": "..."},
1000+
{"function": "v200beta1_ripe_expert",
1001+
"success": false,
1002+
"traceback": "...",
1003+
"time": "..."}
1004+
]
1005+
10031006
"""
10041007
if os.path.isfile(state_file):
10051008
if not os.access(state_file, os.W_OK) and not dry_run:
@@ -1223,8 +1226,6 @@ def upgrade_conf(self, previous=None, dry_run=None, function=None,
12231226
def debug(self, sections=None):
12241227
"""
12251228
Give debugging output
1226-
get_paths:
1227-
print path information
12281229
"""
12291230

12301231
output = {}

intelmq/bots/collectors/http/collector_http.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@
77
HTTP collector bot
88
99
Parameters:
10-
http_url: string
11-
http_header: dictionary
12-
default: {}
13-
http_verify_cert: boolean
14-
default: True
15-
extract_files: value used to extract files from downloaded compressed file
16-
default: None
17-
all: True; some: string with file names separated by ,
18-
http_url_formatting: bool|json to turn on time formatting (and to specify delta to current time)
19-
http_username, http_password: string
20-
http_proxy, https_proxy: string
21-
http_timeout_sec: tuple of two floats or float
22-
http_timeout_max_tries: an integer depicting how often a connection attempt is retried
23-
verify_pgp_signatures: whether to download and check file signatures
24-
default: False
25-
signature_url: string
26-
signature_url_formatting: the same as http_url_formatting
27-
gpg_keyring: none (defaults to user's GPG keyring) or string (path to keyring file)
10+
http_url (string)
11+
http_header (dictionary): default: {}
12+
http_verify_cert (boolean): default: True
13+
extract_files: value used to extract files from downloaded compressed file
14+
default: None
15+
all: True; some: string with file names separated by ,
16+
http_url_formatting (bool|json): to turn on time formatting (and to specify delta to current time)
17+
http_username (string)
18+
http_password (string)
19+
http_proxy (string)
20+
https_proxy (string)
21+
http_timeout_sec: tuple of two floats or float
22+
http_timeout_max_tries (int): an integer depicting how often a connection attempt is retried
23+
verify_pgp_signatures (bool): whether to download and check file signatures
24+
default: False
25+
signature_url (string)
26+
signature_url_formatting: the same as http_url_formatting
27+
gpg_keyring: none (defaults to user's GPG keyring) or string (path to keyring file)
2828
"""
2929
from datetime import datetime, timedelta
3030

intelmq/bots/collectors/http/collector_http_stream.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
HTTP collector bot
88
99
Parameters:
10-
http_url: string
11-
http_header: dictionary
12-
default: {}
13-
http_verify_cert: boolean
14-
default: True
15-
http_username, http_password: string
16-
http_proxy, https_proxy: string
17-
strip_lines: boolean
18-
http_timeout_sec: tuple of two floats or float
10+
http_url: string
11+
http_header: dictionary
12+
default: {}
13+
http_verify_cert: boolean
14+
default: True
15+
http_username, http_password: string
16+
http_proxy, https_proxy: string
17+
strip_lines: boolean
18+
http_timeout_sec: tuple of two floats or float
1919
"""
2020

2121
from http.client import IncompleteRead

intelmq/bots/collectors/misp/collector.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@
66
"""A collector for grabbing appropriately tagged events from MISP.
77
88
Parameters:
9-
- misp_url: URL of the MISP server
10-
- misp_key: API key for accessing MISP
11-
- misp_tag_to_process: MISP tag identifying events to be processed
12-
- misp_tag_processed: MISP tag identifying events that have been processed
9+
misp_url: URL of the MISP server
10+
misp_key: API key for accessing MISP
11+
misp_tag_to_process: MISP tag identifying events to be processed
12+
misp_tag_processed: MISP tag identifying events that have been processed
1313
1414
15-
PyMISP versions released after January 2020 will no longer support the
16-
"old" PyMISP class.
15+
PyMISP versions released after January 2020 will no longer support the "old" PyMISP class.
1716
For compatibility:
18-
* older versions of pymisp still work with this bot
19-
* the deprecated parameter `misp_verify` will create a DeprecationWarning
17+
* older versions of pymisp still work with this bot
18+
* the deprecated parameter `misp_verify` will create a DeprecationWarning
2019
"""
2120
import json
2221
import warnings

intelmq/bots/collectors/shadowserver/collector_reports_api.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,12 @@ class ShadowServerAPICollectorBot(CollectorBot, HttpMixin, CacheMixin):
2424
"""
2525
Connects to the Shadowserver API, requests a list of all the reports for a specific country and processes the ones that are new
2626
27-
Parameters
28-
----------
29-
api_key: str
30-
Your Shadowserver API key
31-
secret: str
32-
Your Shadowserver API secret
33-
country: str
34-
The country you want to download reports for (i.e. 'austria')
35-
types: list
36-
A list of strings or a string of comma-separated values with the names of reporttypes you want to process. If you leave this empty, all the available reports will be downloaded and processed (i.e. 'scan', 'drones', 'intel', 'sandbox_connection', 'sinkhole_combined').
27+
Parameters:
28+
api_key (str): Your Shadowserver API key
29+
secret (str): Your Shadowserver API secret
30+
country (str): The country you want to download reports for (i.e. 'austria')
31+
types (list):
32+
A list of strings or a string of comma-separated values with the names of reporttypes you want to process. If you leave this empty, all the available reports will be downloaded and processed (i.e. 'scan', 'drones', 'intel', 'sandbox_connection', 'sinkhole_combined').
3733
"""
3834

3935
country = None

intelmq/bots/experts/http/expert_status.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ class HttpStatusExpertBot(ExpertBot):
1414
"""
1515
Fetch the HTTP Status for a given URL
1616
17-
Parameters
18-
----------
19-
field: str
20-
The name of the field containing the URL to be checked (defaults to 'source.url').
21-
success_status_codes: List
22-
A list of success status codes. If this parameter is omitted or the list is empty,
23-
successful status codes are the ones between 200 and 400.
24-
overwrite:
25-
Specifies if an existing 'status' value should be overwritten.
17+
Parameters:
18+
field (str):
19+
The name of the field containing the URL to be checked (defaults to 'source.url').
20+
success_status_codes (List):
21+
A list of success status codes. If this parameter is omitted or the list is empty,
22+
successful status codes are the ones between 200 and 400.
23+
overwrite (bool):
24+
Specifies if an existing 'status' value should be overwritten.
2625
"""
2726
field: str = "source.url" # The field containing the URL
2827
success_status_codes: List[int] = [] # A list of status codes for success

intelmq/bots/experts/jinja/expert.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ class JinjaExpertBot(Bot):
1919
"""
2020
Modify the message using the Jinja templating engine
2121
Example:
22-
fields:
23-
output: The provider is {{ msg['feed.provider'] }}!
24-
feed.url: "{{ msg['feed.url'] | upper }}"
25-
extra.somejinjaoutput: file:///etc/intelmq/somejinjatemplate.j2
22+
.. code-block:: yaml
23+
24+
fields:
25+
output: The provider is {{ msg['feed.provider'] }}!
26+
feed.url: "{{ msg['feed.url'] | upper }}"
27+
extra.somejinjaoutput: file:///etc/intelmq/somejinjatemplate.j2
2628
"""
2729

2830
fields: Dict[str, Union[str, Template]] = {}

intelmq/bots/experts/splunk_saved_search/expert.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@
4444
search returns more than one result. All
4545
specified actions are performed. Any
4646
reasonable combination of:
47-
limit: limit the search so that duplicates
48-
are impossible
47+
limit: limit the search so that duplicates are impossible
4948
warn: log a warning message
5049
use_first: use the first search result
5150
ignore: do not modify the event

0 commit comments

Comments
 (0)