You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:45:52 UTC

[buildstream] 01/04: Use pycodestyle instead pep8

This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a commit to branch tlater/pycodestyle
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 2fa058e8ba71b3e59fb108cf9a2b96356c98aa50
Author: Javier Jardón <jj...@gnome.org>
AuthorDate: Fri Aug 10 23:39:31 2018 +0100

    Use pycodestyle instead pep8
    
    pep8 package was renamed to pycodestyle to reduce confusion.
---
 buildstream/_ostree.py |  2 +-
 buildstream/element.py |  2 +-
 dev-requirements.txt   |  3 +--
 setup.cfg              | 16 +++-------------
 4 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/buildstream/_ostree.py b/buildstream/_ostree.py
index 5a4039f..ab652d7 100644
--- a/buildstream/_ostree.py
+++ b/buildstream/_ostree.py
@@ -34,7 +34,7 @@ from ._exceptions import BstError, ErrorDomain
 
 # pylint: disable=wrong-import-position,wrong-import-order
 gi.require_version('OSTree', '1.0')
-from gi.repository import GLib, Gio, OSTree  # nopep8
+from gi.repository import GLib, Gio, OSTree  # noqa
 
 
 # For users of this file, they must expect (except) it.
diff --git a/buildstream/element.py b/buildstream/element.py
index 27c5014..5b2cf85 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -1554,7 +1554,7 @@ class Element(Plugin):
                 utils._force_rmtree(rootdir)
 
             with _signals.terminator(cleanup_rootdir), \
-                self.__sandbox(rootdir, output_file, output_file, self.__sandbox_config) as sandbox:  # nopep8
+                self.__sandbox(rootdir, output_file, output_file, self.__sandbox_config) as sandbox:  # noqa
 
                 # By default, the dynamic public data is the same as the static public data.
                 # The plugin's assemble() method may modify this, though.
diff --git a/dev-requirements.txt b/dev-requirements.txt
index c88b4c7..7b5748b 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -1,11 +1,10 @@
 coverage == 4.4.0
-pep8
 pylint == 2.1.1
 pytest >= 3.7
+pytest-codestyle >= 1.3.0
 pytest-cov >= 2.5.0
 pytest-datafiles
 pytest-env
-pytest-pep8
 pytest-pylint
 pytest-xdist
 pytest-timeout
diff --git a/setup.cfg b/setup.cfg
index 7d40c3d..f4decbf 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -11,20 +11,10 @@ parentdir_prefix = BuildStream-
 test=pytest
 
 [tool:pytest]
-addopts = --verbose --basetemp ./tmp --pep8 --pylint --pylint-rcfile=.pylintrc --cov=buildstream --cov-config .coveragerc --durations=20
+addopts = --verbose --basetemp ./tmp --codestyle --pylint --pylint-rcfile=.pylintrc --cov=buildstream --cov-config .coveragerc --durations=20
 norecursedirs = tests/integration/project integration-cache tmp __pycache__ .eggs
 python_files = tests/*/*.py
-pep8maxlinelength = 119
-pep8ignore =
-    * E129
-    * E125
-    doc/source/conf.py ALL
-    tmp/* ALL
-    */lib/python3* ALL
-    */bin/* ALL
-    buildstream/_fuse/fuse.py ALL
-    .eggs/* ALL
-    *_pb2.py ALL
-    *_pb2_grpc.py ALL
+codestyle_max_line_length = 119
+codestyle_ignore = E129 E125
 env =
     D:BST_TEST_SUITE=True