Showing 131 of 436 total issues
Function join_all
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def join_all(self, wait_for_pending_tasks=True, wait_for_running_tasks=True):
""" Clear the task queue and terminate all pooled threads,
optionally allowing the tasks and threads to finish.
:param wait_for_pending_tasks: whether or not to process pending tasks before joining
:param wait_for_running_tasks: whether or not to wait for running tasks before joining"""
- Read upRead up
- Create 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 add_output_folder
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def add_output_folder(name: str, path: Path or str) -> bool:
if isinstance(path, str):
path = Path(path)
if name in OutputFolders():
raise FileExistsError(f'an output folder is already registered with that name: {name}')
- Read upRead up
- Create 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__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __get__(self, instance, owner=None):
"""
"""
if instance is None:
# Calling from Class object
- Read upRead up
- Create 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 _display_new_version
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _display_new_version(self, latest_version: customversion.CustomVersion):
"""
Shows the latest version found by the updater
"""
if latest_version:
- Read upRead up
- Create 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 _filter_output
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _filter_output(input_):
def _filter_line(line):
# noinspection PyTypeChecker
for filter_str in filter_output:
- Read upRead up
- Create 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 parse_vfs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_vfs(self):
LOGGER.debug('reading "{}"'.format(self._path.abspath()))
with open(self._path.abspath()) as f:
lines = f.readlines()
if lines:
- Read upRead up
- Create 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 farps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def farps(self) -> typing.Generator['Static', None, None]:
for country in self.countries:
assert isinstance(country, Country)
for static in country.statics:
assert isinstance(static, Static)
- Read upRead up
- Create 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 _parse_precip
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _parse_precip(self):
if 'rain' in self.metar.present_weather():
self.precip = 1
self.force_cloud_density = 5
if 'snow' in self.metar.present_weather():
- Read upRead up
- Create 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 unit_pos_to_spot
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def unit_pos_to_spot(unit_pos) -> ParkingSpot:
min_ = 50
res = None
for airport in parkings:
for spot in parkings[airport]:
- Read upRead up
- Create 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_all
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_all(self): # pragma: no cover
ret = set()
for k in self.__class__.__dict__:
if k.startswith('__'):
continue
- Read upRead up
- Create 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 _set_weather
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _set_weather(station_icao, in_file, out_file):
LOGGER.debug(f'getting METAR for {station_icao}')
result = {
'icao': station_icao,
'from': in_file,
- Read upRead up
- Create 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"