6 files changed
@@ -12,14 +12,6 @@ env: | |||
| 12 | 12 | PY_COLORS: 1 | |
| 13 | 13 | ||
| 14 | 14 | jobs: | |
| 15 | - black: | ||
| 16 | - runs-on: ubuntu-latest | ||
| 17 | - steps: | ||
| 18 | - - uses: actions/checkout@v2 | ||
| 19 | - - uses: actions/setup-python@v2 | ||
| 20 | - - uses: psf/black@stable | ||
| 21 | - with: | ||
| 22 | - black_args: ". --check" | ||
| 23 | 15 | commitlint: | |
| 24 | 16 | runs-on: ubuntu-latest | |
| 25 | 17 | steps: | |
@@ -28,10 +20,15 @@ jobs: | |||
| 28 | 20 | fetch-depth: 0 | |
| 29 | 21 | - uses: wagoid/commitlint-github-action@v3 | |
| 30 | 22 | ||
| 31 | - mypy: | ||
| 23 | + linters: | ||
| 32 | 24 | runs-on: ubuntu-latest | |
| 33 | 25 | steps: | |
| 34 | 26 | - uses: actions/checkout@v2 | |
| 35 | 27 | - uses: actions/setup-python@v2 | |
| 36 | 28 | - run: pip install --upgrade tox | |
| 37 | - - run: tox -e mypy | ||
| 29 | + - name: Run black code formatter (https://black.readthedocs.io/en/stable/) | ||
| 30 | + run: tox -e black -- --check | ||
| 31 | + - name: Run flake8 (https://flake8.pycqa.org/en/latest/) | ||
| 32 | + run: tox -e pep8 | ||
| 33 | + - name: Run mypy static typing checker (http://mypy-lang.org/) | ||
| 34 | + run: tox -e mypy | ||
@@ -162,7 +162,6 @@ def docs() -> argparse.ArgumentParser: | |||
| 162 | 162 | if "sphinx" not in sys.modules: | |
| 163 | 163 | sys.exit("Docs parser is only intended for build_sphinx") | |
| 164 | 164 | ||
| 165 | - parser = _get_base_parser(add_help=False) | ||
| 166 | 165 | # NOTE: We must delay import of gitlab.v4.cli until now or | |
| 167 | 166 | # otherwise it will cause circular import errors | |
| 168 | 167 | import gitlab.v4.cli | |
@@ -63,4 +63,4 @@ def test_get_update_appearance(gl, resp_application_appearance): | |||
| 63 | 63 | ||
| 64 | 64 | ||
| 65 | 65 | def test_update_appearance(gl, resp_application_appearance): | |
| 66 | - resp = gl.appearance.update(title=new_title, description=new_description) | ||
| 66 | + gl.appearance.update(title=new_title, description=new_description) | ||
@@ -92,7 +92,7 @@ def test_picklability(self, fake_manager): | |||
| 92 | 92 | assert isinstance(unpickled, FakeObject) | |
| 93 | 93 | assert hasattr(unpickled, "_module") | |
| 94 | 94 | assert unpickled._module == original_obj_module | |
| 95 | - pickled2 = pickle.dumps(unpickled) | ||
| 95 | + pickle.dumps(unpickled) | ||
| 96 | 96 | ||
| 97 | 97 | def test_attrs(self, fake_manager): | |
| 98 | 98 | obj = FakeObject(fake_manager, {"foo": "bar"}) | |
@@ -48,4 +48,4 @@ def mark_all_as_done(self, **kwargs): | |||
| 48 | 48 | Returns: | |
| 49 | 49 | int: The number of todos maked done | |
| 50 | 50 | """ | |
| 51 | - result = self.gitlab.http_post("/todos/mark_as_done", **kwargs) | ||
| 51 | + self.gitlab.http_post("/todos/mark_as_done", **kwargs) | ||
@@ -52,7 +52,11 @@ commands = {posargs} | |||
| 52 | 52 | [flake8] | |
| 53 | 53 | exclude = .git,.venv,.tox,dist,doc,*egg,build, | |
| 54 | 54 | max-line-length = 88 | |
| 55 | - ignore = E501,H501,H803,W503 | ||
| 55 | + # We ignore the following because we use black to handle code-formatting | ||
| 56 | + # E203: Whitespace before ':' | ||
| 57 | + # E501: Line too long | ||
| 58 | + # W503: Line break occurred before a binary operator | ||
| 59 | + ignore = E203,E501,W503 | ||
| 56 | 60 | per-file-ignores = | |
| 57 | 61 | gitlab/v4/objects/__init__.py:F401,F403 | |
| 58 | 62 | ||
0 commit comments