Skip to content

Commit

Permalink
Update test dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Burmak committed Aug 26, 2023
1 parent 888277f commit aad5b36
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,8 @@ disable=broad-exception-caught,
raise-missing-from,
too-few-public-methods,
unnecessary-pass,
use-dict-literal
use-dict-literal,
no-member

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
2 changes: 1 addition & 1 deletion ch_backup/backup/metadata/backup_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def load(cls, data: dict) -> "BackupMetadata":
backup.cloud_storage = CloudStorageMetadata.load(
data.get("cloud_storage", {})
)
backup.start_time = cls._load_time(meta, "start_time")
backup.start_time = cls._load_time(meta, "start_time") # type: ignore[assignment]
backup.end_time = cls._load_time(meta, "end_time")
backup.size = meta["bytes"]
backup.real_size = meta["real_bytes"]
Expand Down
3 changes: 1 addition & 2 deletions ch_backup/clickhouse/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ def _create_session(config, settings):
if settings:
session.params = settings

# pylint: disable=no-member
requests.packages.urllib3.disable_warnings()
requests.packages.urllib3.disable_warnings() # type: ignore[attr-defined]

return session
2 changes: 1 addition & 1 deletion ch_backup/storage/engine/s3/s3_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, config: dict) -> None:
self._multipart_downloads: dict = {}

if config.get("disable_ssl_warnings"):
requests.packages.urllib3.disable_warnings() # pylint: disable=no-member
requests.packages.urllib3.disable_warnings() # type: ignore[attr-defined]

self._bulk_delete_enabled = config.get("bulk_delete_enabled", True)

Expand Down
4 changes: 2 additions & 2 deletions ch_backup/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ def dataclass_from_dict(type_: Type[T], data: dict) -> T:
Function ignores extra keys and is not recursive.
"""
class_fields = {f.name for f in data_fields(type_)}
return type_(**{k: v for k, v in data.items() if k in class_fields}) # type: ignore[call-arg]
class_fields = {f.name for f in data_fields(type_)} # type: ignore[arg-type]
return type_(**{k: v for k, v in data.items() if k in class_fields})


# pylint: disable=invalid-name
Expand Down
15 changes: 12 additions & 3 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
[mypy]
ignore_missing_imports = yes
disallow_incomplete_defs = yes
check_untyped_defs = yes
ignore_missing_imports = True
disallow_incomplete_defs = True
check_untyped_defs = True
implicit_optional = True

[mypy-dataclasses.*]
ignore_missing_imports = True

; Suppress errors related to Click library usage
[mypy-ch_backup.cli.*]
disable_error_code = arg-type

; Suppress errors related to PyHamcrest library usage
[mypy-tests.integration.steps.*]
disable_error_code = arg-type,call-overload,misc
32 changes: 15 additions & 17 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
isort
black
ruff; python_version >="3.7"
pep8
pylint
mypy==0.910
types-PyYAML
types-dataclasses==0.6.6
types-requests<2.27
types-setuptools
types-tabulate
bandit
isort; python_version >="3.8"
black; python_version >="3.8"
ruff; python_version >="3.8"
pylint; python_version >="3.8"
mypy==1.5.1; python_version >="3.8"
mypy-boto3-s3; python_version >="3.8"
types-PyYAML; python_version >="3.8"
types-dataclasses; python_version >="3.8"
types-requests; python_version >="3.8"
types-setuptools; python_version >="3.8"
types-tabulate; python_version >="3.8"
bandit; python_version >="3.8"
codespell; python_version >="3.8"
pytest
PyHamcrest==2.0.0
PyHamcrest
hypothesis
behave
docker<5.0
docker-compose<1.28
websocket-client<1.0 # required for docker-compose<1.28
Jinja2
deepdiff<5.8
mypy-boto3-s3==1.21.7 # this is the last version that requires typing-extensions<4.0.0
codespell; python_version >="3.7"
tomli; python_version >="3.7"
deepdiff

0 comments on commit aad5b36

Please sign in to comment.