Showing 74 of 82 total issues
Line too long (84 > 79 characters) Open
Open
np.mean(self.fitness_history[episode - self.n_trials:episode]) \
- Read upRead up
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (80 > 79 characters) Open
Open
Creature.disjointedness_importance = config['disjointedness_importance']
- Read upRead up
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (96 > 79 characters) Open
Open
run_id = db.Column(db.String(16), db.ForeignKey('run.id'), nullable=False, primary_key=True)
- Read upRead up
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (85 > 79 characters) Open
Open
self.weight_velocity[i] = Particle.momentum * self.weight_velocity[i] + \
- Read upRead up
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Continuation line over-indented for visual indent Open
Open
Particle.acceleration_global_best * b * diff_best
- Read upRead up
- Exclude checks
Continuation lines indentation.
Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.
When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
as a continuation line.
Okay: a = (\n)
E123: a = (\n )
Okay: a = (\n 42)
E121: a = (\n 42)
E122: a = (\n42)
E123: a = (\n 42\n )
E124: a = (24,\n 42\n)
E125: if (\n b):\n pass
E126: a = (\n 42)
E127: a = (24,\n 42)
E128: a = (24,\n 42)
E129: if (a or\n b):\n pass
E131: a = (\n 42\n 24)
Continuation line over-indented for visual indent Open
Open
len(self.members)
- Read upRead up
- Exclude checks
Continuation lines indentation.
Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.
When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
as a continuation line.
Okay: a = (\n)
E123: a = (\n )
Okay: a = (\n 42)
E121: a = (\n 42)
E122: a = (\n42)
E123: a = (\n 42\n )
E124: a = (24,\n 42\n)
E125: if (\n b):\n pass
E126: a = (\n 42)
E127: a = (24,\n 42)
E128: a = (24,\n 42)
E129: if (a or\n b):\n pass
E131: a = (\n 42\n 24)
Blank line at end of file Open
Open
- Read upRead up
- Exclude checks
Trailing blank lines are superfluous.
Okay: spam(1)
W391: spam(1)\n
However the last line should end with a new line (warning W292).
Line too long (82 > 79 characters) Open
Open
Particle.acceleration_self * a * diff_self + \
- Read upRead up
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
parent1 = random.choice(pool)
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
if random.random() < Genome.p_perturb:
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
key = random.choice(list(self.adjectives.keys()))
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
mutate_only = random.random() < Creature.p_mutate_only
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
if random.random() < Genome.p_add_node:
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
elif random.random() < Genome.p_add_connection:
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
if random.random() < Species.p_interspecies_mating:
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
gene = random.choice(disabled_genes)
- Exclude checks
Use of insecure MD2, MD4, MD5, or SHA1 hash function. Open
Open
run_id_hash = hashlib.sha1()
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
adjective = random.choice(self.adjectives[key])
- Exclude checks
Standard pseudo-random generators are not suitable for security/cryptographic purposes. Open
Open
a = random.random()
- Exclude checks
Refactor this function to reduce its Cognitive Complexity from 25 to the 15 allowed. Open
Open
def train(self, n_episodes=100, n_steps=200, n_pso_episodes=5,
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.