diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ce3bbbc68231a7f392272281e3b85e1041fbb84..819e7b00efd56216dd51895536a200a0209a4500 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,10 +33,10 @@ build package: untracked: true expire_in: 1 hour -check for whitespace: +check whitespace style: stage: build script: - - "! for f in `git ls-files | grep -v \\.diff$`; do file $f | grep -q ' text' && grep -l '[[:blank:]]$' $f; done | grep . >&2" + - "! for f in `git ls-files | grep -v \\.diff$`; do file $f | grep -q ' text' || continue; grep -q '[[:blank:]]$' $f && echo $f: trailing whitespace; tail -n1 $f | read -r _ || echo $f: no newline at end of file; tail -n1 $f | grep -q '^$' && echo $f: empty line at end of file; done | grep . >&2" allow_failure: true check for dependencies installed: diff --git a/doc/source/pre/whatsnew/1.3.rst b/doc/source/pre/whatsnew/1.3.rst index 2a3435506c0825d58181d7f160c92ceb6aff9423..4607fbbf29f06db936d0b729c645acd0647459fd 100644 --- a/doc/source/pre/whatsnew/1.3.rst +++ b/doc/source/pre/whatsnew/1.3.rst @@ -61,4 +61,4 @@ namely time-reversal symmetry, particle-hole symmetry and chiral (or sublattice) symmetry. When one or more of these symmetries are present, and it can be useful to have leads with scattering states that reflect this. It is now possible to these discrete symmetries in Kwant, which then uses -them to construct scattering states that are accordingly symmetric. \ No newline at end of file +them to construct scattering states that are accordingly symmetric. diff --git a/kwant/physics/tests/test_leads.py b/kwant/physics/tests/test_leads.py index d852795981398b72c9a533b6d5ff54c647b7fe46..b2a4c7cb71733f8d020dc156332867a861e1730d 100644 --- a/kwant/physics/tests/test_leads.py +++ b/kwant/physics/tests/test_leads.py @@ -604,4 +604,4 @@ def test_PHS_TRIM(): assert_almost_equal(phs_modes[:, 1::2], p_mat.dot(phs_modes[:, ::2].conj()), err_msg='PHS broken at a TRIM in ' + sym) assert_almost_equal(phs_modes.T.conj().dot(phs_modes), np.eye(phs_modes.shape[1]), - err_msg='Modes are not orthonormal, TRIM PHS in ' + sym) \ No newline at end of file + err_msg='Modes are not orthonormal, TRIM PHS in ' + sym)