Skip to content

Commit 8c73df3

Browse files
authored
Merge pull request #365 from sgsmob/pylint
add pylintrc file to each indicator
2 parents a233937 + 6b407bf commit 8c73df3

File tree

29 files changed

+331
-70
lines changed

29 files changed

+331
-70
lines changed

_delphi_utils_python/.pylintrc

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1-
[DESIGN]
21

3-
min-public-methods=1
2+
[MESSAGES CONTROL]
43

4+
disable=logging-format-interpolation,
5+
too-many-locals,
6+
too-many-arguments,
7+
# Allow pytest functions to be part of a class.
8+
no-self-use,
9+
# Allow pytest classes to have one test.
10+
too-few-public-methods
511

6-
[MESSAGES CONTROL]
12+
[BASIC]
13+
14+
# Allow arbitrarily short-named variables.
15+
variable-rgx=[a-z_][a-z0-9_]*
16+
argument-rgx=[a-z_][a-z0-9_]*
17+
18+
[DESIGN]
719

8-
disable=R0801, C0330, E1101, E0611, C0114, C0116, C0103, R0913, R0914, W0702
20+
# Don't complain about pytest "unused" arguments.
21+
ignored-argument-names=(_.*|run_as_module)

_template_python/.pylintrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
[MESSAGES CONTROL]
3+
4+
disable=logging-format-interpolation,
5+
too-many-locals,
6+
too-many-arguments,
7+
# Allow pytest functions to be part of a class.
8+
no-self-use,
9+
# Allow pytest classes to have one test.
10+
too-few-public-methods
11+
12+
[BASIC]
13+
14+
# Allow arbitrarily short-named variables.
15+
variable-rgx=[a-z_][a-z0-9_]*
16+
argument-rgx=[a-z_][a-z0-9_]*
17+
18+
[DESIGN]
19+
20+
# Don't complain about pytest "unused" arguments.
21+
ignored-argument-names=(_.*|run_as_module)

cdc_covidnet/.pylintrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
[MESSAGES CONTROL]
3+
4+
disable=logging-format-interpolation,
5+
too-many-locals,
6+
too-many-arguments,
7+
# Allow pytest functions to be part of a class.
8+
no-self-use,
9+
# Allow pytest classes to have one test.
10+
too-few-public-methods
11+
12+
[BASIC]
13+
14+
# Allow arbitrarily short-named variables.
15+
variable-rgx=[a-z_][a-z0-9_]*
16+
argument-rgx=[a-z_][a-z0-9_]*
17+
18+
[DESIGN]
19+
20+
# Don't complain about pytest "unused" arguments.
21+
ignored-argument-names=(_.*|run_as_module)

changehc/.pylintrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
[MESSAGES CONTROL]
3+
4+
disable=logging-format-interpolation,
5+
too-many-locals,
6+
too-many-arguments,
7+
# Allow pytest functions to be part of a class.
8+
no-self-use,
9+
# Allow pytest classes to have one test.
10+
too-few-public-methods
11+
12+
[BASIC]
13+
14+
# Allow arbitrarily short-named variables.
15+
variable-rgx=[a-z_][a-z0-9_]*
16+
argument-rgx=[a-z_][a-z0-9_]*
17+
18+
[DESIGN]
19+
20+
# Don't complain about pytest "unused" arguments.
21+
ignored-argument-names=(_.*|run_as_module)

claims_hosp/.pylintrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
[MESSAGES CONTROL]
3+
4+
disable=logging-format-interpolation,
5+
too-many-locals,
6+
too-many-arguments,
7+
# Allow pytest functions to be part of a class.
8+
no-self-use,
9+
# Allow pytest classes to have one test.
10+
too-few-public-methods
11+
12+
[BASIC]
13+
14+
# Allow arbitrarily short-named variables.
15+
variable-rgx=[a-z_][a-z0-9_]*
16+
argument-rgx=[a-z_][a-z0-9_]*
17+
18+
[DESIGN]
19+
20+
# Don't complain about pytest "unused" arguments.
21+
ignored-argument-names=(_.*|run_as_module)

combo_cases_and_deaths/.pylintrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
[MESSAGES CONTROL]
3+
4+
disable=logging-format-interpolation,
5+
too-many-locals,
6+
too-many-arguments,
7+
# Allow pytest functions to be part of a class.
8+
no-self-use,
9+
# Allow pytest classes to have one test.
10+
too-few-public-methods
11+
12+
[BASIC]
13+
14+
# Allow arbitrarily short-named variables.
15+
variable-rgx=[a-z_][a-z0-9_]*
16+
argument-rgx=[a-z_][a-z0-9_]*
17+
18+
[DESIGN]
19+
20+
# Don't complain about pytest "unused" arguments.
21+
ignored-argument-names=(_.*|run_as_module)

emr_hosp/.pylintrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
[MESSAGES CONTROL]
3+
4+
disable=logging-format-interpolation,
5+
too-many-locals,
6+
too-many-arguments,
7+
# Allow pytest functions to be part of a class.
8+
no-self-use,
9+
# Allow pytest classes to have one test.
10+
too-few-public-methods
11+
12+
[BASIC]
13+
14+
# Allow arbitrarily short-named variables.
15+
variable-rgx=[a-z_][a-z0-9_]*
16+
argument-rgx=[a-z_][a-z0-9_]*
17+
18+
[DESIGN]
19+
20+
# Don't complain about pytest "unused" arguments.
21+
ignored-argument-names=(_.*|run_as_module)

google_health/.pylintrc

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
1-
[DESIGN]
21

3-
min-public-methods=1
2+
[MESSAGES CONTROL]
43

4+
disable=logging-format-interpolation,
5+
too-many-locals,
6+
too-many-arguments,
7+
# Allow pytest functions to be part of a class.
8+
no-self-use,
9+
# Allow pytest classes to have one test.
10+
too-few-public-methods
511

6-
[MESSAGES CONTROL]
12+
[BASIC]
13+
14+
# Allow arbitrarily short-named variables.
15+
variable-rgx=[a-z_][a-z0-9_]*
16+
argument-rgx=[a-z_][a-z0-9_]*
17+
18+
[DESIGN]
719

8-
disable=R0801, C0330, E1101, E0611, C0114, C0116, C0103, R0913, R0914, W0702
20+
# Don't complain about pytest "unused" arguments.
21+
ignored-argument-names=(_.*|run_as_module)

google_health/delphi_google_health/pull_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def query(self, start_date: str, end_date: str, geo_id, dma=False) -> dict:
7777
start_date,
7878
end_date,
7979
)
80-
data = self.service.getTimelinesForHealth(**params).execute()
80+
data = self.service.getTimelinesForHealth(**params).execute() #pylint: disable=no-member
8181

8282
return data
8383

google_health/delphi_google_health/smooth.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,12 @@ def _left_gauss_linear(s: np.ndarray, h=10, impute=False, minval=None) -> np.nda
6060

6161
n = len(s)
6262
t = np.zeros_like(s, dtype=np.float64)
63-
X = np.vstack([np.ones(n), np.arange(n)]).T
63+
X = np.vstack([np.ones(n), np.arange(n)]).T #pylint: disable=invalid-name
6464
for idx in range(n):
6565
wts = np.exp(-((np.arange(idx + 1) - idx) ** 2) / (h ** 2))
66-
XwX = np.dot(X[: (idx + 1), :].T * wts, X[: (idx + 1), :])
67-
Xwy = np.dot(X[: (idx + 1), :].T * wts, s[: (idx + 1)].reshape(-1, 1))
66+
XwX = np.dot(X[: (idx + 1), :].T * wts, X[: (idx + 1), :]) #pylint: disable=invalid-name
67+
Xwy = np.dot(X[: (idx + 1), :].T * wts, #pylint: disable=invalid-name
68+
s[: (idx + 1)].reshape(-1, 1))
6869
try:
6970
beta = np.linalg.solve(XwX, Xwy)
7071
t[idx] = np.dot(X[: (idx + 1), :], beta)[-1]

0 commit comments

Comments
 (0)