Showing 32 of 51 total issues
File httpsequence.py
has 621 lines of code (exceeds 250 allowed). Consider refactoring. Open
import abc
import re
import sys
import gevent
HttpSequence
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class HttpSequence(BaseSequence):
__metaclass__ = abc.ABCMeta
def __init__(self,
settings=None,
Function search_by_data
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def search_by_data(self, event_data):
if isinstance(event_data, dict):
found = False
for event_key, event in six.iteritems(self.events):
for search_key, search_value in six.iteritems(event_data):
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _generate_http_request_entry
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def _generate_http_request_entry(self,
event,
is_resource=False,
is_async=False):
# Check for prepended events
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_wn_headers
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def get_wn_headers(self):
# Retrieve white noise headers
for index, entry in enumerate(self._parsed_entries.get('entries', [])):
if index == 0:
self.wn_headers = entry.request.headers
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function var_from_regex
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def var_from_regex(self,
name,
regex,
target='body',
instances='first',
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function http_request
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def http_request(self,
url,
method='GET',
is_resource=False,
response_hooks=None,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _parse_request
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _parse_request(self, index, resource):
"""
Parses a request into HtmlResource
:param index:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function calculate_events
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def calculate_events(self,
think_time_threshold=3.0,
new_sequence_threshold=7.0):
previous_entry = HtmlResource()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _parse_request
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _parse_request(entry, resource):
"""
Parses a request into HtmlResource
:param entry:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _handle_event_list
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _handle_event_list(self, event_list):
for event in event_list:
if event.type in ('http_request', 'http_load_page'):
self._generate_load_page_entry(event)
elif event.type == 'http_load_resource':
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _parse_response
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _parse_response(self, index, resource):
"""
Parses a response into HtmlResource
:param index:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def get(self, name):
if name not in six.viewkeys(self._reserved_variables):
if name in six.viewkeys(self._public_variables):
return self._public_variables.get(name)
else:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function delete
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def delete(self, name):
if name not in six.viewkeys(self._reserved_variables):
if name in six.viewkeys(self._public_variables):
self._public_variables.pop(name)
self._reserved_variables['last_updated_on'] = \
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self,
Function http_request
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def http_request(self,
Function delete
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def delete(self,
Function patch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def patch(self,
Function async_http_request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def async_http_request(self,