Skip to content

Commit c1434c9

Browse files
wxmerktnim65s
andauthored
Fix flake8 errors (#318)
* Fix flake8 errors * flake8: ignore E203 * flake8: 119 cols for now * black * fix comment style * exclude cmake.py * clang-format: sort include Co-authored-by: Guilhem Saurel <[email protected]>
1 parent ad7d1fe commit c1434c9

File tree

14 files changed

+43
-23
lines changed

14 files changed

+43
-23
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repos:
55
rev: v14.0.6
66
hooks:
77
- id: clang-format
8-
args: ['--style={BasedOnStyle: Google, SortIncludes: false}']
8+
args: [--style=Google]
99
- repo: https://github.com/pre-commit/pre-commit-hooks
1010
rev: v4.3.0
1111
hooks:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ EigenPy — Efficient Python bindings between Numpy/Eigen
77
<a href="https://anaconda.org/conda-forge/eigenpy"><img src="https://img.shields.io/conda/dn/conda-forge/eigenpy.svg" alt="Conda Downloads"/></a>
88
<a href="https://anaconda.org/conda-forge/eigenpy"><img src="https://img.shields.io/conda/vn/conda-forge/eigenpy.svg" alt="Conda Version"/></a>
99
<a href="https://badge.fury.io/py/eigenpy"><img src="https://badge.fury.io/py/eigenpy.svg" alt="PyPI version"></a>
10+
<a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black"></a>
1011
</p>
1112

1213
**EigenPy** is an open source framework which allows to bind the famous [Eigen](http://eigen.tuxfamily.org) C++ library in Python.

benchmarks/bench-switch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import eigenpy
44
import numpy as np
55

6-
import time
7-
import timeit
6+
import time # noqa
7+
import timeit # noqa
88

99
from IPython import get_ipython
1010

python/eigenpy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# Copyright (c) 2017-2021 CNRS INRIA
33
#
44

5-
from .eigenpy_pywrap import *
6-
from .eigenpy_pywrap import __version__, __raw_version__
5+
from .eigenpy_pywrap import * # noqa
6+
from .eigenpy_pywrap import __version__, __raw_version__ # noqa

setup.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
extend-ignore = E203
3+
max-line-length = 88
4+
exclude = cmake/.docs/cmake.py

unittest/eigen_ref.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <iostream>
77

88
#include "eigenpy/eigenpy.hpp"
9+
// include main header first
910
#include "eigenpy/eigen-from-python.hpp"
1011

1112
using namespace Eigen;

unittest/python/test_LLT.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import eigenpy
22

33
import numpy as np
4-
import numpy.linalg as la
54

65
dim = 100
76
A = np.random.rand(dim, dim)

unittest/python/test_complex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import print_function
22

33
import numpy as np
4-
from complex import *
4+
from complex import switchToNumpyArray, real, imag, ascomplex
55

66
switchToNumpyArray()
77

unittest/python/test_dimensions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import print_function
22

33
import eigenpy
4-
import numpy as np
54

65
quat = eigenpy.Quaternion()
76
# By default, we convert as numpy.matrix

unittest/python/test_eigen_ref.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
import numpy as np
2-
from eigen_ref import *
2+
from eigen_ref import (
3+
printMatrix,
4+
asRef,
5+
asConstRef,
6+
fill,
7+
getBlock,
8+
editBlock,
9+
modify_block,
10+
has_ref_member,
11+
)
312

413

514
def test(mat):

0 commit comments

Comments
 (0)