Function _save_image
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def _save_image(self, image: Image.Image, filename: typing.Optional[str]=None,
overwrite: bool=True) -> bool:
'''
Internal method for saving an image to a file
'''
- 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 screenshot_window
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def screenshot_window(self, delay: int=0, capture_cursor: bool=False,
cursor_name: typing.Optional[str]=None,
overwrite: bool=False, count: int=1
) -> typing.Optional[Image.Image]:
"""
- 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 screenshot_full_display
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def screenshot_full_display(self, delay: int=0, capture_cursor: bool=False,
cursor_name: typing.Optional[str]=None,
overwrite: bool=False, count: int=1
) -> typing.Optional[Image.Image]:
"""
- 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 screenshot_selected
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def screenshot_selected(self, delay: int=0, capture_cursor: bool=False,
cursor_name: typing.Optional[str]=None,
overwrite: bool=False, count: int=1,
region: typing.Optional[typing.Tuple[int, int, int, int]]=None
) -> typing.Optional[Image.Image]:
- 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 save_screenshot_collection
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def save_screenshot_collection(self, foldername: typing.Optional[str]=None) -> bool:
'''
Saves every image in the current screenshot collection
'''
- 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"