Add new linters, update some already used ones and fix some new found issues

This commit is contained in:
Marco Castelluccio 2021-09-14 14:21:29 +02:00
Родитель 12afe6db48
Коммит 52970c5b35
7 изменённых файлов: 69 добавлений и 39 удалений

10
.github/dependabot.yml поставляемый
Просмотреть файл

@ -1,7 +1,7 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 99
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 99

Просмотреть файл

@ -1,40 +1,66 @@
repos:
- repo: https://github.com/asottile/seed-isort-config
- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.5.3
- id: seed-isort-config
- repo: https://github.com/timothycrosley/isort
rev: 5.9.1
hooks:
- id: isort
- repo: https://github.com/ambv/black
rev: stable
- id: isort
- repo: https://github.com/ambv/black
rev: 21.6b0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.3.2
hooks:
- id: flake8
additional_dependencies: ['flake8-coding==1.3.1', 'flake8-copyright==0.2.2', 'flake8-debugger==3.1.0', 'flake8-mypy==17.8.0']
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
- id: prettier
exclude: ^tests/|libmozdata/modules.json
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: trailing-whitespace
- id: flake8
additional_dependencies:
- "flake8-coding==1.3.1"
- "flake8-copyright==0.2.2"
- "flake8-debugger==3.1.0"
- "flake8-mypy==17.8.0"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-ast
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: trailing-whitespace
exclude: ^tests/uplift/|^tests/html/
- id: check-yaml
- id: mixed-line-ending
- id: check-yaml
- id: mixed-line-ending
exclude: ^tests/html/
- id: name-tests-test
args: ['--django']
- id: name-tests-test
args: ["--django"]
exclude: tests/auto_mock.py
- id: check-json
- id: check-json
exclude: ^tests/mocks/
- repo: https://github.com/codespell-project/codespell
rev: v1.17.1
- id: requirements-txt-fixer
- id: check-vcs-permalinks
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
- id: codespell
exclude: libmozdata/modules.json
- repo: meta
- repo: https://github.com/marco-c/taskcluster_yml_validator
rev: v0.0.7
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- id: taskcluster_yml
- repo: https://github.com/asottile/yesqa
rev: v1.2.3
hooks:
- id: yesqa
- repo: meta
hooks:
- id: check-useless-excludes
default_language_version:
python: python3

Просмотреть файл

@ -5,6 +5,7 @@ For more details, please read the
[Mozilla Community Participation Guidelines](https://www.mozilla.org/about/governance/policies/participation/).
## How to Report
For more information on how to report violations of the Community Participation Guidelines, please read our '[How to Report](https://www.mozilla.org/about/governance/policies/participation/reporting/)' page.
<!--

Просмотреть файл

@ -1,15 +1,16 @@
# libmozdata
> Library to access and aggregate several Mozilla data sources
The goal is to provide a library giving access to a wide range of Mozilla data sources. This library also provides some post processing on data.
[![Build Status](https://api.travis-ci.org/mozilla/libmozdata.svg?branch=master)](https://travis-ci.org/mozilla/libmozdata)
[![codecov.io](https://img.shields.io/codecov/c/github/mozilla/libmozdata/master.svg)](https://codecov.io/github/mozilla/libmozdata?branch=master)
## Setup
Install the prerequisites via `pip`:
```sh
sudo pip install -r requirements.txt
```
@ -17,11 +18,13 @@ sudo pip install -r requirements.txt
## Running tests
Install test prerequisites via `pip`:
```sh
sudo pip install -r test-requirements.txt
```
Run tests:
```sh
coverage run --source=libmozdata -m unittest discover tests/
```

Просмотреть файл

@ -62,7 +62,7 @@ class BZInfo(Bugzilla):
A collaboration between A & B is when A reviews a patch of B (or reciprocally)
in term of graph:
- each node represents a reviewer or a writter (owner)
- each node represents a reviewer or a writer (owner)
- each edge represents a collaboration
here we count the degree of each node and find out who's the best collaborator

Просмотреть файл

@ -1,8 +1,8 @@
requests[security]>=2.7.0
icalendar>=3.10
python-dateutil>=2.5.2
python-hglib>=2.6.1
requests-futures>=0.9.8
requests[security]>=2.7.0
setuptools>=28.6.1
six>=1.10.0
whatthepatch>=0.0.4
python-dateutil>=2.5.2
icalendar>=3.10
setuptools>=28.6.1
python-hglib>=2.6.1

Просмотреть файл

@ -1,3 +1,3 @@
coverage
responses
pre-commit
responses