Showing 81 of 90 total issues
Method "__init__" has 20 parameters, which is greater than the 7 authorized. Open
Open
self, file_parser: Callable[[str, BeautifulSoup, Set[str], Log], None], url_validator: Callable[[str, Log], bool],
use_cli: bool=True, bloom_filters_capacity: int=1e9, responses_queue_max_size: int= 10000, download_attempts: int=10, follow_robots_txt: bool=True,
proxy_timeout: float=10, domains_timeout: float=10, robots_timeout: float=60*60*24, connection_timeout: float=5, cooldown_time_beetween_download_attempts: float=1,
custom_domains_timeout: Callable[[str], float] = None, custom_connection_timeout: Callable[[str], float] = None, maximal_failure_proxy_rate=0.9,
parser_library: str="html5lib",
- Read upRead up
- Exclude checks
A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.
Noncompliant Code Example
With a maximum number of 4 parameters:
def do_something(param1, param2, param3, param4, param5): ...
Compliant Solution
def do_something(param1, param2, param3, param4): ...