Skip to content

Commit 2723b6c

Browse files
authored
🚚 move pylint to pre-commit (#4242)
1 parent cb43e80 commit 2723b6c

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

.pre-commit-config.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ repos:
2222
rev: 20.8b1
2323
hooks:
2424
- id: black
25+
- repo: https://github.com/PyCQA/pylint
26+
rev: pylint-2.6.0
27+
hooks:
28+
- id: pylint
29+
args: [--rcfile=.pylintrc]
30+
files: ^pymc3/
2531
- repo: local
2632
hooks:
2733
- id: watermark

.pylintrc

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ disable=all
3434
# Enable the message, report, category or checker with the given id(s). You can
3535
# either give multiple identifier separated by comma (,) or put this option
3636
# multiple time. See also the "--disable" option for examples.
37-
enable=import-error,
38-
import-self,
37+
enable=import-self,
3938
reimported,
4039
wildcard-import,
4140
misplaced-future,

pymc3/backends/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
"""
1919
import itertools as itl
2020
import logging
21-
from typing import Dict, List, Optional
21+
from typing import List
2222
from abc import ABC
2323

2424
import numpy as np
2525
import warnings
2626
import theano.tensor as tt
2727

28-
from ..model import modelcontext, Model
28+
from ..model import modelcontext
2929
from .report import SamplerReport, merge_reports
3030
from ..util import get_var_name
3131

scripts/lint.sh

-3
This file was deleted.

scripts/test.sh

-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,5 @@
22

33
set -e
44

5-
if [[ "$RUN_PYLINT" == "true" ]]; then
6-
. ./scripts/lint.sh
7-
fi
8-
95
_FLOATX=${FLOATX:=float64}
106
THEANO_FLAGS="floatX=${_FLOATX},gcc.cxxflags='-march=core2'" pytest -v --cov=pymc3 --cov-report=xml "$@" --cov-report term

0 commit comments

Comments
 (0)