Skip to content

Commit 3efca8f

Browse files
author
Mindee
committed
⬆️ update pylint
1 parent 6cd40df commit 3efca8f

File tree

5 files changed

+30
-16
lines changed

5 files changed

+30
-16
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ repos:
2727
- id: gitleaks
2828

2929
- repo: https://github.com/PyCQA/pylint
30-
rev: v3.2.7
30+
rev: v3.3.1
3131
hooks:
3232
- id: pylint
3333
name: pylint

.pylintrc

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ extension-pkg-whitelist=
3939
fail-on=
4040

4141
# Specify a score threshold under which the program will exit with error.
42-
fail-under=10.0
42+
fail-under=10
4343

4444
# Interpret the stdin as a python script, whose filename needs to be passed as
4545
# the module_or_package argument.
@@ -59,10 +59,11 @@ ignore-paths=tests,docs,examples,^mindee/product/fr/carte_grise/.*$
5959
# Emacs file locks
6060
ignore-patterns=^\.#
6161

62-
# List of module names for which member attributes should not be checked
63-
# (useful for modules/projects where namespaces are manipulated during runtime
64-
# and thus existing member attributes cannot be deduced by static analysis). It
65-
# supports qualified module names, as well as Unix pattern matching.
62+
# List of module names for which member attributes should not be checked and
63+
# will not be imported (useful for modules/projects where namespaces are
64+
# manipulated during runtime and thus existing member attributes cannot be
65+
# deduced by static analysis). It supports qualified module names, as well as
66+
# Unix pattern matching.
6667
ignored-modules=
6768

6869
# Python code to execute, usually for sys.path manipulation such as
@@ -86,6 +87,10 @@ load-plugins=
8687
# Pickle collected data for later comparisons.
8788
persistent=yes
8889

90+
# Resolve imports to .pyi stubs if available. May reduce no-member messages and
91+
# increase not-an-iterable messages.
92+
prefer-stubs=no
93+
8994
# Minimum Python version to use for version dependent checks. Will default to
9095
# the version used to run pylint.
9196
#py-version=3.8
@@ -127,7 +132,7 @@ attr-naming-style=snake_case
127132
# Regular expression matching correct attribute names. Overrides attr-naming-
128133
# style. If left empty, attribute names will be checked with the set naming
129134
# style.
130-
attr-rgx=[a-z_][a-z0-9_]{1,40}$
135+
#attr-rgx=
131136

132137
# Bad variable names which should always be refused, separated by a comma.
133138
bad-names=foo,
@@ -302,6 +307,9 @@ max-locals=15
302307
# Maximum number of parents for a class (see R0901).
303308
max-parents=7
304309

310+
# Maximum number of positional arguments for function / method.
311+
max-positional-arguments=5
312+
305313
# Maximum number of public methods for a class (see R0904).
306314
max-public-methods=20
307315

@@ -426,6 +434,7 @@ disable=duplicate-code,
426434
missing-module-docstring,
427435
too-many-instance-attributes,
428436
too-many-arguments,
437+
too-many-positional-arguments,
429438

430439
# Enable the message, report, category or checker with the given id(s). You can
431440
# either give multiple identifier separated by comma (,) or put this option
@@ -463,6 +472,11 @@ max-nested-blocks=5
463472
# printed.
464473
never-returning-functions=sys.exit,argparse.parse_error
465474

475+
# Let 'consider-using-join' be raised when the separator to join on would be
476+
# non-empty (resulting in expected fixes of the type: ``"- " + " -
477+
# ".join(items)``)
478+
suggest-join-with-non-empty-separator=yes
479+
466480

467481
[REPORTS]
468482

@@ -477,8 +491,9 @@ evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor
477491
# used to format the message information. See doc for all details.
478492
msg-template=
479493

480-
# Set the output format. Available formats are text, parseable, colorized, json
481-
# and msvs (visual studio). You can also give a reporter class, e.g.
494+
# Set the output format. Available formats are: text, parseable, colorized,
495+
# json2 (improved json format), json (old json format) and msvs (visual
496+
# studio). You can also give a reporter class, e.g.
482497
# mypackage.mymodule.MyReporterClass.
483498
#output-format=
484499

@@ -513,7 +528,7 @@ min-similarity-lines=4
513528
max-spelling-suggestions=4
514529

515530
# Spelling dictionary name. No available dictionaries : You need to install
516-
# both the python package and the system dependency for enchant to work..
531+
# both the python package and the system dependency for enchant to work.
517532
spelling-dict=
518533

519534
# List of comma separated words that should be considered directives if they

mindee/mindee_http/base_settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from typing import Dict, Optional, Union
44

55
from mindee.logger import logger
6-
from mindee.versions import __version__, get_platform, python_version
6+
from mindee.versions import PYTHON_VERSION, __version__, get_platform
77

88
API_KEY_ENV_NAME = "MINDEE_API_KEY"
99
API_KEY_DEFAULT = ""
@@ -15,7 +15,7 @@
1515
TIMEOUT_DEFAULT = 120
1616

1717
PLATFORM = get_platform()
18-
USER_AGENT = f"mindee-api-python@v{__version__} python-v{python_version} {PLATFORM}"
18+
USER_AGENT = f"mindee-api-python@v{__version__} python-v{PYTHON_VERSION} {PLATFORM}"
1919

2020

2121
@dataclass

mindee/versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
__version__ = "4.15.0"
44

5-
python_version = f"{sys.version_info[0]}.{sys.version_info[1]}"
5+
PYTHON_VERSION = f"{sys.version_info[0]}.{sys.version_info[1]}"
66

77

88
def get_platform() -> str:

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools", "wheel"]
2+
requires = ["setuptools >= 69.0.0", "wheel >= 0.40.0"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
@@ -44,7 +44,7 @@ Changelog = "https://github.com/mindee/mindee-api-python/blob/main/CHANGELOG.md"
4444

4545
[project.optional-dependencies]
4646
lint = [
47-
"pylint==3.2.7",
47+
"pylint==3.3.1",
4848
"pre-commit~=3.2.2",
4949
"types-pytz>=2023.3",
5050
"types-requests>=2.31",
@@ -60,7 +60,6 @@ docs = [
6060
"sphinx-autodoc-typehints~=1.20",
6161
]
6262
build = [
63-
"setuptools==57.5.0",
6463
"build",
6564
"twine",
6665
]

0 commit comments

Comments
 (0)