Showing 13 of 45 total issues
Function setup_class
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Confirmed
def setup_class(cls, **kwargs):
"""Configure 'cls.attribute'. If name start with 'test_' and have
decorator skipIf with value True, then not open bot
"""
tests_methods = []
- Read upRead up
- Create a ticketCreate a ticket
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_elements
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Confirmed
def get_elements(self, config_controls):
"""Search element on Bot instance, choose selector
from instance or locator param
Arguments:
- Read upRead up
- Create a ticketCreate a ticket
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 a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Confirmed
def __init__(self, bot, **kwargs):
"""Instance of PageBase class
Arguments:
bot {BotBase} -- BotBase or inherit class instance
- Read upRead up
- Create a ticketCreate a ticket
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 driver_name_filter
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Confirmed
def driver_name_filter(self, driver_name=None):
"""Filter names of driver to search selected on config list
Keyword Arguments:
driver_name {str} -- driver_name_format is
- Read upRead up
- Create a ticketCreate a ticket
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 read_file
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def read_file(is_json=False, file_path=None, encoding='utf-8',
- Create a ticketCreate a ticket
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Confirmed
def __init__(self, driver, log, driver_wait=None, driver_actions=None,
- Create a ticketCreate a ticket
Function set_css_rule
has 5 arguments (exceeds 4 allowed). Consider refactoring. Confirmed
def set_css_rule(self, css_selector, css_prop, css_value,
- Create a ticketCreate a ticket
Function get_log
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Confirmed
def get_log(self, log_name='browser', raises=False):
"""Get selenium log by name, this depends of
driver mode and browser what it's using each time
Keyword Arguments:
- Read upRead up
- Create a ticketCreate a ticket
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 __check_dropdown__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
def __check_dropdown__(self, text, by_value=False, by_index=False):
"""Internal funcionality for select/deselect methods"""
if not self._element or not self._dropdown:
self.reload(**self._settings)
if self._dropdown is None:
- Read upRead up
- Create a ticketCreate a ticket
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 ele_click
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
def ele_click(self, element=None, selector=None, locator=By.CSS_SELECTOR):
"""Perform click webelement with locator param or search it by default
CSS_SELECTOR value if element it's none but selector
it's not default value
- Read upRead up
- Create a ticketCreate a ticket
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 _load
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
def _load(self):
self.log = Log(
log_path=self.settings.get('log_output_file'),
log_name=self.settings.get('log_name'),
log_level=self.settings.get('log_level'))
- Read upRead up
- Create a ticketCreate a ticket
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 _load
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
def _load(self, settings=None):
"""Loads page elements and maximize browser window"""
# TODO: tests passed ?
self.log = self.bot.log
if not settings:
- Read upRead up
- Create a ticketCreate a ticket
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 path_format
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Confirmed
def path_format(file_path=None, file_name=None, is_abspath=False,
ignore_raises=False):
"""
Get path joined checking before if path and filepath exist,
if not, raise an Exception
- Read upRead up
- Create a ticketCreate a ticket
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"