Showing 131 of 436 total issues
File mission.py
has 1264 lines of code (exceeds 250 allowed). Consider refactoring. Open
# coding=utf-8
import typing
from calendar import timegm
from itertools import chain
- Create a ticket
File base.py
has 630 lines of code (exceeds 250 allowed). Consider refactoring. Open
# coding=utf-8
import abc
import typing
from abc import abstractmethod
- Create a ticket
File build.py
has 617 lines of code (exceeds 250 allowed). Consider refactoring. Open
# coding=utf-8
"""
Collections of tools to build EMFT
"""
import datetime
- Create a ticket
File qt_resource.py
has 594 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.9.1)
- Create a ticket
Weather
has 52 functions (exceeds 20 allowed). Consider refactoring. Open
class Weather(BaseMissionObject):
validator_precipitations = Validator(_type=int, _min=0, _max=4, exc=ValueError, logger=LOGGER)
validator_cloud_density = Validator(_type=int, _min=0, _max=10, exc=ValueError, logger=LOGGER)
validator_cloud_thickness = Validator(_type=int, _min=200, _max=2000, exc=ValueError,
logger=LOGGER)
- Create a ticket
Function object
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
def object(self): # noqa C901
o = dict()
k = ''
idx = 0
numeric_keys = False
- 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 __encode
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
def __encode(self, obj, dict_name=None): # noqa C901
s = ''
tab = self.tab
newline = self.newline
if isinstance(obj, str):
- 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 discover_skins
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def discover_skins(self):
self.__skins = {}
def scan_dir(p: Path):
- 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_channel
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def filter_channel(
self,
versions: typing.Set[CustomVersion],
prerelease: str = channel.STABLE
):
- 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
Group
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class Group(Country):
attribs = ('group_category', 'group_index', 'group_hidden', 'group_start_time', '_group_name_key')
class Route:
- Create a ticket
File sltp.py
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
# coding=utf-8
"""Simple Lua Python Parser"""
import re
import mpmath
- Create a ticket
Updater
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class Updater(Machine):
def __init__(self, current_version: str, av_user: str, av_repo: str, local_executable: str, channel: str, **_):
Machine.__init__(
self,
states=[
- Create a ticket
GroundControl
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class GroundControl(BaseMissionObject):
validator_commander = Validator(_type=int, _min=0, _max=100, exc=ValueError, logger=LOGGER)
def __init__(self, mission_dict, l10n):
super().__init__(mission_dict, l10n)
- Create a ticket
Function data
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def data(self, index: QModelIndex, role=Qt.DisplayRole):
if index.isValid():
if role == Qt.DisplayRole:
item = self._data[index.row()]
if hasattr(item, '__len__'):
- 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
File updater.py
has 287 lines of code (exceeds 250 allowed). Consider refactoring. Open
# coding=utf-8
import io
import os
import subprocess
import typing
- Create a ticket
BaseUnit
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class BaseUnit(Group):
validator_skill = Validator(_type=str,
_in_list=['Average', 'Good', 'High', 'Excellent', 'Random', 'Client', 'Player'],
exc=ValueError, logger=LOGGER)
validator_unit_types = Validator(_type=str, _in_list=[], exc=ValueError, logger=LOGGER)
- Create a ticket
Function add_children
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def add_children(self, children: list): # noqa C901
for r in range(len(children)): # "r" is the row
child = children[r]
for c in range(len(child)): # "c" is the column
if child[c] is None:
- 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
Coalition
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class Coalition(BaseMissionObject):
def __init__(self, mission_dict, ln10, coa_color):
super().__init__(mission_dict, ln10)
self.coa_color = coa_color
self._countries = {}
- Create a ticket
GHRepo
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class GHRepo(JSONObject):
def owner(self) -> GHUser:
return GHUser(self.json['owner'])
def permissions(self):
- Create a ticket
Function string
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def string(self, end=None):
s = ''
start = self.ch
if end == '[':
end = ']'
- 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"