Skip to content

Commit 0d404fd

Browse files
committed
major pylint fixes
1 parent 2e263f5 commit 0d404fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1249
-594
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
title: ''
5-
labels: bug
6-
assignees: ''
1+
- - name: Bug report
2+
about: Create a report to help us improve
3+
title: ''
4+
labels: bug
5+
assignees: ''
76

8-
---
7+
- -
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
@@ -21,3 +20,4 @@ The obtained output. Please include the entire error trace.
2120

2221
**Additional context**
2322
Add any other context about the problem here.
23+
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
---
2-
name: Feature request
3-
about: Suggest an idea for this project
4-
title: ''
5-
labels: enhancement
6-
assignees: ''
1+
- - name: Feature request
2+
about: Suggest an idea for this project
3+
title: ''
4+
labels: enhancement
5+
assignees: ''
76

8-
---
7+
- -
98

109
**Is your feature request related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
10+
A clear and concise description of what the problem is. Ex. I'm always
11+
frustrated when [...]
1212

1313
**Describe the solution you'd like**
1414
A clear and concise description of what you want to happen.
1515

1616
**Describe alternatives you've considered**
17-
A clear and concise description of any alternative solutions or features you've considered.
17+
A clear and concise description of any alternative solutions or features you've
18+
considered.
1819

1920
**Additional context**
2021
Add any other context or screenshots about the feature request here.
22+
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
---
2-
name: Help wanted
3-
about: Ask help for using the package
4-
title: ''
5-
labels: help wanted
6-
assignees: ''
1+
- - name: Help wanted
2+
about: Ask help for using the package
3+
title: ''
4+
labels: help wanted
5+
assignees: ''
76

8-
---
7+
- -
98

109
**The objective**
1110
A clear description of the purpose of your application.
1211

1312
**Already tried tests**
14-
The snippet of code you have already tried in order to obtain the wanted outcome.
13+
The snippet of code you have already tried in order to obtain the wanted
14+
outcome.
15+

.markdownlint.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"default": true,
3+
"MD041": false,
4+
"MD012": false,
5+
"ignores": [
6+
"venv_pygem/**",
7+
"venv/**",
8+
"**/site-packages/**"
9+
]
10+
}

.pylintrc

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ init-hook="import numpy"
1111

1212
# Add files or directories to the blacklist. They should be base names, not
1313
# paths.
14-
ignore=
14+
ignore=venv_pygem,build,pygem.egg-info,docs,dockerfiles,test_final_verification.py,code_formatter.sh,pyproject.toml
1515

1616
# Pickle collected data for later comparisons.
1717
persistent=no
@@ -39,7 +39,7 @@ extension-pkg-whitelist=
3939
# operator. Joining a lot of strings can lead to a maximum recursion error in
4040
# Pylint and this flag can prevent that. It has one side effect, the resulting
4141
# AST will be different than the one from reality.
42-
optimize-ast=no
42+
# optimize-ast=no
4343

4444

4545
[MESSAGES CONTROL]
@@ -128,6 +128,14 @@ disable=
128128
# deprecated-str-translate-call,
129129
import-error,
130130
arguments-differ,
131+
C0114,
132+
C0115,
133+
C0116,
134+
R0801,
135+
W0511,
136+
R0914,
137+
R0915,
138+
C0103,
131139
# invalid-name,
132140
# consider-using-enumerate
133141

@@ -165,7 +173,7 @@ output-format=parseable
165173
# Put messages in a separate file for each module / package specified on the
166174
# command line instead of printing them on stdout. Reports (if any) will be
167175
# written in a file name "pylint_global.[txt|html]".
168-
files-output=no
176+
# files-output=no
169177

170178
# Tells whether to display a full report or only the messages
171179
reports=no
@@ -205,7 +213,7 @@ single-line-if-stmt=no
205213
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
206214
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
207215
# `empty-line` allows space-only lines.
208-
no-space-check=trailing-comma,dict-separator
216+
# no-space-check=trailing-comma,dict-separator
209217

210218
# Maximum number of lines in a module
211219
max-module-lines=1000
@@ -303,7 +311,7 @@ notes=FIXME,XXX,TODO
303311
[BASIC]
304312

305313
# List of builtins function names that should not be used, separated by a comma
306-
bad-functions=map,filter,input
314+
# bad-functions=map,filter,input
307315

308316
# Good variable names which should always be accepted, separated by a comma
309317
good-names=i,j,k,x,y,z,ex,Run,_
@@ -322,61 +330,61 @@ include-naming-hint=no
322330
function-rgx=[a-z_][a-z0-9_]{2,30}$
323331

324332
# Naming hint for function names
325-
function-name-hint=[a-z_][a-z0-9_]{2,30}$
333+
# function-name-hint=[a-z_][a-z0-9_]{2,30}$
326334

327335
# Regular expression matching correct variable names
328336
variable-rgx=[a-z_][a-z0-9_]{2,30}$
329337

330338
# Naming hint for variable names
331-
variable-name-hint=[a-z_][a-z0-9_]{2,30}$
339+
# variable-name-hint=[a-z_][a-z0-9_]{2,30}$
332340

333341
# Regular expression matching correct constant names
334342
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
335343

336344
# Naming hint for constant names
337-
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
345+
# const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
338346

339347
# Regular expression matching correct attribute names
340348
attr-rgx=[a-z_][a-z0-9_]{2,30}$
341349

342350
# Naming hint for attribute names
343-
attr-name-hint=[a-z_][a-z0-9_]{2,30}$
351+
# attr-name-hint=[a-z_][a-z0-9_]{2,30}$
344352

345353
# Regular expression matching correct argument names
346354
argument-rgx=[a-z_][a-z0-9_]{2,30}$
347355

348356
# Naming hint for argument names
349-
argument-name-hint=[a-z_][a-z0-9_]{2,30}$
357+
# argument-name-hint=[a-z_][a-z0-9_]{2,30}$
350358

351359
# Regular expression matching correct class attribute names
352360
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
353361

354362
# Naming hint for class attribute names
355-
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
363+
# class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
356364

357365
# Regular expression matching correct inline iteration names
358366
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
359367

360368
# Naming hint for inline iteration names
361-
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
369+
# inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
362370

363371
# Regular expression matching correct class names
364372
class-rgx=[A-Z_][a-zA-Z0-9]+$
365373

366374
# Naming hint for class names
367-
class-name-hint=[A-Z_][a-zA-Z0-9]+$
375+
# class-name-hint=[A-Z_][a-zA-Z0-9]+$
368376

369377
# Regular expression matching correct module names
370378
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
371379

372380
# Naming hint for module names
373-
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
381+
# module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
374382

375383
# Regular expression matching correct method names
376384
method-rgx=[a-z_][a-z0-9_]{2,30}$
377385

378386
# Naming hint for method names
379-
method-name-hint=[a-z_][a-z0-9_]{2,30}$
387+
# method-name-hint=[a-z_][a-z0-9_]{2,30}$
380388

381389
# Regular expression which should only match function or class names that do
382390
# not require a docstring.
@@ -390,7 +398,7 @@ docstring-min-length=-1
390398
[ELIF]
391399

392400
# Maximum number of nested blocks for function / method body
393-
max-nested-blocks=5
401+
max-nested-blocks=6
394402

395403

396404
[IMPORTS]
@@ -416,6 +424,9 @@ int-import-graph=
416424
# Maximum number of arguments for function / method
417425
max-args=8
418426

427+
# Maximum number of positional arguments for function / method
428+
max-positional-arguments=6
429+
419430
# Argument names that match this expression will be ignored. Default to name
420431
# with leading underscore
421432
ignored-argument-names=_.*
@@ -427,7 +438,7 @@ max-locals=20
427438
max-returns=4
428439

429440
# Maximum number of branch for function / method body
430-
max-branches=12
441+
max-branches=13
431442

432443
# Maximum number of statements in function / method body
433444
max-statements=50
@@ -436,16 +447,16 @@ max-statements=50
436447
max-parents=7
437448

438449
# Maximum number of attributes for a class (see R0902).
439-
max-attributes=7
450+
max-attributes=8
440451

441452
# Minimum number of public methods for a class (see R0903).
442-
min-public-methods=2
453+
min-public-methods=1
443454

444455
# Maximum number of public methods for a class (see R0904).
445456
max-public-methods=20
446457

447458
# Maximum number of boolean expressions in a if statement
448-
max-bool-expr=5
459+
max-bool-expr=6
449460

450461

451462
[CLASSES]
@@ -468,4 +479,4 @@ exclude-protected=_asdict,_fields,_replace,_source,_make
468479

469480
# Exceptions that will emit a warning when being caught. Defaults to
470481
# "Exception"
471-
overgeneral-exceptions=Exception
482+
overgeneral-exceptions=builtins.Exception

0 commit comments

Comments
 (0)