Showing 32 of 48 total issues
Function fetch_github_token
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def fetch_github_token(self):
"""
Fetch GitHub token. First try to use variable provided
by --token option, otherwise try to fetch it from git config
and last CHANGELOG_GITHUB_TOKEN env variable.
- 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_line
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def parse_line(self, line):
if not line or self.non_configuration_line(line):
return
option_name, value = self.extract_pair(line)
- 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 delete_by_time
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def delete_by_time(self, issues, older_tag, newer_tag):
"""
Filter issues that belong to specified tag range.
:param list(dict) issues: Issues to filter.
- 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 filter_between_tags
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def filter_between_tags(self, all_tags):
"""
Filter tags according between_tags option.
:param list(dict) all_tags: Pre-filtered tags.
- 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_header
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_header(self, newer_tag_name, newer_tag_link,
Function last_older_tag
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def last_older_tag(self):
older_tag = {"name": self.get_temp_tag_for_repo_creation()}
if self.options.between_tags or self.options.since_tag:
older_tag_date = self.get_time_of_tag(older_tag)
newer_tag_date = self.get_time_of_tag(self.filtered_tags[-1])
- 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 checkname
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def checkname(filename):
if not os.path.exists(filename):
return filename
mtch = re.match(r'(?P<filename>.*?)(?P<nr>\d+)(?P<rest>($|.md)?)',
filename)
- 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 filter_wo_labels
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def filter_wo_labels(self, all_issues):
"""
Filter all issues that don't have a label.
:rtype: list(dict)
- 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_log_for_all_tags
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def generate_log_for_all_tags(self):
"""
The full cycle of generation for whole project.
:rtype: str
- 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 find_closed_date_by_commit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_closed_date_by_commit(self, issue):
"""
Fill "actual_date" parameter of specified issue by closed date of
the commit, if it was closed by commit.
- 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_header
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def generate_header(self, newer_tag_name, newer_tag_link,
newer_tag_time,
older_tag_link, project_url):
"""
Generate a header for a tag section with specific parameters.
- 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 find_issues_to_add
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_issues_to_add(all_issues, tag_name):
"""
Add all issues, that should be in that tag, according to milestone.
:param list(dict) all_issues: All issues.
- 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"