From 0f3068d1567de8d0f50c2ad8761d584dbddcc700 Mon Sep 17 00:00:00 2001 From: Christoph Groth <christoph.groth@cea.fr> Date: Tue, 10 Nov 2015 12:12:35 +0100 Subject: [PATCH] fix formatting --- examples/square.py | 1 + kwant/builder.py | 2 -- kwant/digest.py | 2 -- kwant/graph/tests/test_scotch.py | 8 ++++---- kwant/graph/tests/test_utils.py | 2 +- kwant/lattice.py | 2 -- kwant/linalg/lll.py | 3 +-- kwant/rmt.py | 2 -- kwant/system.py | 1 - kwant/tests/test_builder.py | 1 - kwant/tests/test_lattice.py | 1 - 11 files changed, 7 insertions(+), 18 deletions(-) diff --git a/examples/square.py b/examples/square.py index c61089cd..580df113 100644 --- a/examples/square.py +++ b/examples/square.py @@ -9,6 +9,7 @@ from kwant.physics.leads import square_selfenergy __all__ = ['System'] + class Lead(object): def __init__(self, width, t, potential): self.width = width diff --git a/kwant/builder.py b/kwant/builder.py index b8a37d17..cd83747d 100644 --- a/kwant/builder.py +++ b/kwant/builder.py @@ -6,8 +6,6 @@ # the file AUTHORS.rst at the top-level directory of this distribution and at # http://kwant-project.org/authors. - - __all__ = ['Builder', 'Site', 'SiteFamily', 'SimpleSiteFamily', 'Symmetry', 'HoppingKind', 'Lead', 'BuilderLead', 'SelfEnergyLead', 'ModesLead'] diff --git a/kwant/digest.py b/kwant/digest.py index 7d2d16d9..0b502d5f 100644 --- a/kwant/digest.py +++ b/kwant/digest.py @@ -19,8 +19,6 @@ good enough to pass the "dieharder" battery of tests: see the function `test` of this module. """ - - from math import pi, log, sqrt, cos from hashlib import md5 from struct import unpack diff --git a/kwant/graph/tests/test_scotch.py b/kwant/graph/tests/test_scotch.py index ca7e25af..2ded31ae 100644 --- a/kwant/graph/tests/test_scotch.py +++ b/kwant/graph/tests/test_scotch.py @@ -17,9 +17,9 @@ def _DISABLED_test_bisect(): size = 5 graph = Graph() - for i in range(size-1): + for i in range(size - 1): offset = i * size - for j in range(size-1): + for j in range(size - 1): graph.add_edge(offset + j, offset + j + 1) graph.add_edge(offset + j + 1, offset + j) if i > 0: @@ -36,9 +36,9 @@ def _DISABLED_test_reset(): size = 5 graph = Graph() - for i in range(size-1): + for i in range(size - 1): offset = i * size - for j in range(size-1): + for j in range(size - 1): graph.add_edge(offset + j, offset + j + 1) graph.add_edge(offset + j + 1, offset + j) if i > 0: diff --git a/kwant/graph/tests/test_utils.py b/kwant/graph/tests/test_utils.py index ae7f3d22..0906765e 100644 --- a/kwant/graph/tests/test_utils.py +++ b/kwant/graph/tests/test_utils.py @@ -83,7 +83,7 @@ def test_induced_subgraph(): num_nodes = 6 graph = Graph() - for i in range(num_nodes-1): + for i in range(num_nodes - 1): graph.add_edge(i, i + 1) graph.add_edge(1, 0) g = graph.compressed() diff --git a/kwant/lattice.py b/kwant/lattice.py index ff74ecd2..e9322898 100644 --- a/kwant/lattice.py +++ b/kwant/lattice.py @@ -6,8 +6,6 @@ # the file AUTHORS.rst at the top-level directory of this distribution and at # http://kwant-project.org/authors. - - __all__ = ['TranslationalSymmetry', 'general', 'Polyatomic', 'Monatomic', 'chain', 'square', 'triangular', 'honeycomb', 'kagome'] diff --git a/kwant/linalg/lll.py b/kwant/linalg/lll.py index 9a29b473..c9f2540f 100644 --- a/kwant/linalg/lll.py +++ b/kwant/linalg/lll.py @@ -6,13 +6,12 @@ # the file AUTHORS.rst at the top-level directory of this distribution and at # http://kwant-project.org/authors. - - __all__ = ['lll', 'cvp', 'voronoi'] import numpy as np from itertools import product + def gs_coefficient(a, b): """Gram-Schmidt coefficient.""" return np.dot(a, b) / np.linalg.norm(b)**2 diff --git a/kwant/rmt.py b/kwant/rmt.py index 1d307f66..6442fc0a 100644 --- a/kwant/rmt.py +++ b/kwant/rmt.py @@ -6,8 +6,6 @@ # the file AUTHORS.rst at the top-level directory of this distribution and at # http://kwant-project.org/authors. - - __all__ = ['gaussian', 'circular'] import numpy as np diff --git a/kwant/system.py b/kwant/system.py index 45d0b473..ca541b4a 100644 --- a/kwant/system.py +++ b/kwant/system.py @@ -8,7 +8,6 @@ """Low-level interface of systems""" - __all__ = ['System', 'FiniteSystem', 'InfiniteSystem'] import abc diff --git a/kwant/tests/test_builder.py b/kwant/tests/test_builder.py index 920bc2ff..11b95c4b 100644 --- a/kwant/tests/test_builder.py +++ b/kwant/tests/test_builder.py @@ -6,7 +6,6 @@ # the file AUTHORS.rst at the top-level directory of this distribution and at # http://kwant-project.org/authors. - import warnings from random import Random from nose.tools import assert_raises diff --git a/kwant/tests/test_lattice.py b/kwant/tests/test_lattice.py index a9f8a94a..f2169863 100644 --- a/kwant/tests/test_lattice.py +++ b/kwant/tests/test_lattice.py @@ -6,7 +6,6 @@ # the file AUTHORS.rst at the top-level directory of this distribution and at # http://kwant-project.org/authors. - from math import sqrt import numpy as np import tinyarray as ta -- GitLab