Skip to content

Commit

Permalink
Updates for pylint 2.2
Browse files Browse the repository at this point in the history
Remove unnecessary `pass` statements

Disable literal-comparison because it gives false positives (True is 1 is not the same as True == 1)
  • Loading branch information
drasmuss committed Nov 26, 2018
1 parent a6cc9c1 commit c1f4198
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion nengo_dl/benchmarks.py
Expand Up @@ -408,7 +408,6 @@ def run_profile(net, train=False, n_steps=150, do_profile=True, **kwargs):
@click.group(chain=True)
def main():
"""Command-line interface for benchmarks."""
pass


@main.command()
Expand Down
1 change: 0 additions & 1 deletion nengo_dl/builder.py
Expand Up @@ -202,7 +202,6 @@ def build_post(self, ops, signals, sess, rng):
rng : `~numpy.random.RandomState`
Seeded random number generator
"""
pass

@staticmethod
def mergeable(x, y):
Expand Down
1 change: 0 additions & 1 deletion nengo_dl/simulator.py
Expand Up @@ -41,7 +41,6 @@
# using a version of Nengo before Convolution was added
class Convolution:
"""Dummy convolution class."""
pass

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion nengo_dl/tests/test_benchmarks.py
Expand Up @@ -106,7 +106,7 @@ def test_run_profile(train, pytestconfig):
dtype=(tf.float32 if pytest.config.getvalue("dtype") == "float32" else
tf.float64))

assert net.config[net].inference_only == (False if train else True)
assert net.config[net].inference_only == (not train)


def test_cli():
Expand Down
1 change: 0 additions & 1 deletion nengo_dl/utils.py
Expand Up @@ -411,7 +411,6 @@ def step(self, **kwargs):
"""
Noop for incrementing the progress bar.
"""
pass


def minibatch_generator(data, minibatch_size, shuffle=True,
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Expand Up @@ -35,6 +35,7 @@ disable =
invalid-name,
invalid-sequence-index,
len-as-condition,
literal-comparison,
no-else-return,
no-member,
no-name-in-module,
Expand Down

0 comments on commit c1f4198

Please sign in to comment.