Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • gitlab-tools gitlab-tools
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • TPA
  • gitlab-toolsgitlab-tools
  • Merge requests
  • !1

hook into gitlab CI for linting, black, tests, and mypy

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged anarcat requested to merge ci into main Feb 16, 2022
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 6

None of those trigger an error, and some of them (e.g. tests) are even broken (at least locally).

black, in particular, has a bunch of changes, a lot around quotes, but also flake8 errors like "too many blank lines".

flake8 also fails on those, and especially outline issues around a nasty import * that we should generally avoid.

mypy is unhappy about missing stubs for the gitlab module, although that module should have type hints:

https://github.com/python-gitlab/python-gitlab/commit/e4421caafeeb0236df19fe7b9233300727e1933b

.. so I'm not sure what's up with that.

In general, this aims towards the following policies:

  • flake8-clean, with an exception for <120 char lines
  • black-clean
  • unit tests that pass
  • mypy type annotations

We're failing on most of those, but it doesn't mean we shouldn't try to catch future errors those tests could find.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ci