diff --git a/ampel/alert/AmpelAlert.py b/ampel/alert/AmpelAlert.py index ee19b1d3..76f88da4 100755 --- a/ampel/alert/AmpelAlert.py +++ b/ampel/alert/AmpelAlert.py @@ -24,7 +24,7 @@ 'is': operator.is_, 'is not': operator.is_not, 'contains': operator.contains, - 'exists': None, # type: ignore + 'exists': None, # type: ignore[dict-item] } diff --git a/ampel/base/AlternativeAmpelBaseModel.py b/ampel/base/AlternativeAmpelBaseModel.py index 8db4c901..01fab1bc 100755 --- a/ampel/base/AlternativeAmpelBaseModel.py +++ b/ampel/base/AlternativeAmpelBaseModel.py @@ -53,7 +53,7 @@ def __init_subclass__(cls, *args, **kwargs) -> None: Combines annotations & default values of this class with the one defined in sub-classes. Has similarities with the newly introduced typing.get_type_hints() function. """ - super().__init_subclass__(*args, **kwargs) # type: ignore + super().__init_subclass__(*args, **kwargs) joined_ann = { k: v for k, v in cls._annots.items() @@ -78,7 +78,7 @@ def __init_subclass__(cls, *args, **kwargs) -> None: continue joined_defaults[k] = base.__dict__[k] # if None | with no default - elif get_origin(v) in (Union, UnionType) and NoneType in get_args(v) and k not in joined_defaults: # type: ignore[misc] + elif get_origin(v) in (Union, UnionType) and NoneType in get_args(v) and k not in joined_defaults: joined_defaults[k] = None elif k in cls._slot_defaults: joined_defaults[k] = cls._slot_defaults[k] @@ -164,7 +164,7 @@ def _has_nested_model(cls, annot: type) -> bool: if cls._debug > 1: print("Checking " + str(annot).replace('collections.abc.', '') + " for nested models") - if isinstance(annot, _GenericAlias) and hasattr(annot, 'mro') and issubclass(get_origin(annot), Secret): # type: ignore + if isinstance(annot, _GenericAlias) and hasattr(annot, 'mro') and issubclass(get_origin(annot), Secret): return True for i, el in enumerate(get_args(annot)): diff --git a/ampel/base/AmpelABC.py b/ampel/base/AmpelABC.py index b67f0a8a..08587b36 100644 --- a/ampel/base/AmpelABC.py +++ b/ampel/base/AmpelABC.py @@ -40,8 +40,7 @@ def __init_subclass__(cls, abstract: bool = False, **kwargs) -> None: omits to call to the super method. """ - # https://github.com/python/mypy/issues/5887 - super().__init_subclass__(**kwargs) # type: ignore + super().__init_subclass__(**kwargs) # If class name contains '[', it is parameterization of a subclass of # (AmpelBaseModel, Generic), and not a true subclass. Skip it. diff --git a/ampel/base/AmpelUnit.py b/ampel/base/AmpelUnit.py index d1c32edd..cbf50223 100644 --- a/ampel/base/AmpelUnit.py +++ b/ampel/base/AmpelUnit.py @@ -45,7 +45,7 @@ def __init_subclass__(cls, *args, **kwargs) -> None: Combines annotations & default values of this class with the one defined in sub-classes. Has similarities with the newly introduced typing.get_type_hints() function. """ - super().__init_subclass__(*args, **kwargs) # type: ignore + super().__init_subclass__(*args, **kwargs) joined_ann = { k: v for k, v in cls._annots.items() @@ -89,7 +89,7 @@ def __init_subclass__(cls, *args, **kwargs) -> None: else: joined_defaults[k] = base.__dict__[k] # if None | with no default - elif get_origin(v) in (Union, UnionType) and NoneType in get_args(v) and k not in joined_defaults: # type: ignore[misc] + elif get_origin(v) in (Union, UnionType) and NoneType in get_args(v) and k not in joined_defaults: joined_defaults[k] = None elif k in cls._slot_defaults: joined_defaults[k] = cls._slot_defaults[k] @@ -123,7 +123,7 @@ def _create_model(cls, omit_traceless: bool = False) -> type[BaseModel]: defs = cls._defaults if hasattr(cls, 'model_fields'): - cls.model_fields.clear() # type: ignore[attr-defined] + cls.model_fields.clear() if omit_traceless: ttf = type(Traceless) @@ -141,7 +141,7 @@ def _create_model(cls, omit_traceless: bool = False) -> type[BaseModel]: return create_model( cls.__name__, __base__ = AmpelBaseModel, - **kwargs # type: ignore + **kwargs # type: ignore[call-overload] ) diff --git a/ampel/base/AuxUnitRegister.py b/ampel/base/AuxUnitRegister.py index 2d5c41c0..5574b996 100755 --- a/ampel/base/AuxUnitRegister.py +++ b/ampel/base/AuxUnitRegister.py @@ -8,7 +8,7 @@ # Last Modified By: valery brinnel from importlib import import_module -from typing import Any, ClassVar, overload # type: ignore[attr-defined] +from typing import Any, ClassVar, overload from ampel.base.AmpelUnit import AmpelUnit from ampel.config.AmpelConfig import AmpelConfig @@ -51,12 +51,12 @@ def new_unit(cls, model: UnitModel, *, sub_type: None | type[T] = None, **kwargs if model.config: if isinstance(model.config, dict): - return Klass(**(model.config | kwargs)) # type: ignore[call-arg] + return Klass(**(model.config | kwargs)) raise ValueError("Auxiliary units cannot use config aliases") - unit = Klass(**kwargs) # type: ignore[call-arg] + unit = Klass(**kwargs) if hasattr(unit, "post_init"): - unit.post_init() # type: ignore[union-attr] + unit.post_init() return unit diff --git a/ampel/base/LogicalUnit.py b/ampel/base/LogicalUnit.py index 7aed1c3b..1f4595ec 100755 --- a/ampel/base/LogicalUnit.py +++ b/ampel/base/LogicalUnit.py @@ -46,7 +46,7 @@ class LogicalUnit(AmpelUnit): @classmethod def __init_subclass__(cls, **kwargs) -> None: - super().__init_subclass__(**kwargs) # type: ignore + super().__init_subclass__(**kwargs) cls.require = tuple( set(getattr(cls, "require", None) or []) | { el for base in cls.__bases__ diff --git a/ampel/cli/AmpelArgumentParser.py b/ampel/cli/AmpelArgumentParser.py index dc4482cd..33de0f6e 100755 --- a/ampel/cli/AmpelArgumentParser.py +++ b/ampel/cli/AmpelArgumentParser.py @@ -95,7 +95,8 @@ def __init__(self, ampel_op: None | str = None, **kwargs) -> None: optional_group._group_actions = [] # Capitalize title - optional_group.title = optional_group.title.capitalize() # type: ignore + if optional_group.title: + optional_group.title = optional_group.title.capitalize() # Add required argument group (first pos) self.groups["required"] = self.add_argument_group('Required arguments') diff --git a/ampel/cli/config.py b/ampel/cli/config.py index bfe11870..78b00357 100644 --- a/ampel/cli/config.py +++ b/ampel/cli/config.py @@ -9,7 +9,7 @@ from os import environ, makedirs, path -from appdirs import user_data_dir # type: ignore[import] +from platformdirs import user_data_dir def get_user_data_config_path() -> str: diff --git a/ampel/config/AmpelConfig.py b/ampel/config/AmpelConfig.py index f4b10de3..7d7c7196 100755 --- a/ampel/config/AmpelConfig.py +++ b/ampel/config/AmpelConfig.py @@ -108,7 +108,7 @@ def get(self, entry: str | int | Sequence[str | int], ret_type: type[JT], *, rai """ config.get('logging', dict, raise_exc=True) """ - def get(self, # type: ignore[misc] + def get(self, entry: None | str | int | Sequence[str | int] = None, ret_type: None | type[JT] = None, *, raise_exc: bool = False diff --git a/ampel/util/hash.py b/ampel/util/hash.py index 6f857a6e..f633d5fc 100755 --- a/ampel/util/hash.py +++ b/ampel/util/hash.py @@ -7,7 +7,7 @@ # Last Modified Date: 12.07.2022 # Last Modified By: valery brinnel -import json # type: ignore[import] +import json from typing import TypeVar import xxhash @@ -48,7 +48,7 @@ def hash_payload(payload: bytes, ret: type[HT] = int, size: int = -64) -> HT: # x = getattr(xxhash, f'xxh{abs(size)}_{xxfunc[ret]}')(payload) # Convert unsigned to signed int if passed 'size' parameter is negative - if size < 0 and ret == int and x & (1 << (-size-1)): # type: ignore[operator] + if size < 0 and ret == int and x & (1 << (-size-1)): x = x - 2**-size return x diff --git a/ampel/util/mappings.py b/ampel/util/mappings.py index 4c5fcd4c..76144a09 100755 --- a/ampel/util/mappings.py +++ b/ampel/util/mappings.py @@ -103,7 +103,7 @@ def set_by_path( :returns: False if the key was successfully set, True otherwise """ if isinstance(path, str): - path = path.split(delimiter) # type: ignore + path = path.split(delimiter) l = len(path) - 1 for i, k in enumerate(path): if k not in d: @@ -121,7 +121,7 @@ def del_by_path(d: dict, path: str | Sequence[str], delimiter: str = '.') -> boo """ :returns: False if the key was successfully deleted, True otherwise """ if isinstance(path, str): - path = path.split(delimiter) # type: ignore + path = path.split(delimiter) l = len(path) - 1 for i, k in enumerate(path): if k not in d: diff --git a/ampel/util/tag.py b/ampel/util/tag.py index b9ba5a86..b58d9159 100644 --- a/ampel/util/tag.py +++ b/ampel/util/tag.py @@ -103,7 +103,7 @@ def merge_tags( if arg1 is None: if arg2 is None: return None - return merge_tags(arg2, arg1, reduce) # type: ignore # no idea, no time + return merge_tags(arg2, arg1, reduce) # type: ignore[call-overload] # no idea, no time if isinstance(arg1, str | int): if isinstance(arg2, str | int): diff --git a/ampel/view/ReadOnlyDict.py b/ampel/view/ReadOnlyDict.py index e24ed176..148b138e 100755 --- a/ampel/view/ReadOnlyDict.py +++ b/ampel/view/ReadOnlyDict.py @@ -17,11 +17,11 @@ def __readonly__(self, *args, **kwargs): __setitem__ = __readonly__ __delitem__ = __readonly__ - pop = __readonly__ # type: ignore + pop = __readonly__ # type: ignore[assignment] popitem = __readonly__ clear = __readonly__ - update = __readonly__ # type: ignore - setdefault = __readonly__ # type: ignore + update = __readonly__ # type: ignore[assignment] + setdefault = __readonly__ # type: ignore[assignment] del __readonly__ diff --git a/ampel/view/SnapView.py b/ampel/view/SnapView.py index c2d9098a..7467bcc2 100755 --- a/ampel/view/SnapView.py +++ b/ampel/view/SnapView.py @@ -269,7 +269,7 @@ def get_t2_ntuple(self, """ for t2v in self.get_t2_views(unit): - if (x := t2v.get_ntuple( # type: ignore + if (x := t2v.get_ntuple( # type: ignore[call-overload] key, rtype, no_none = no_none, require_all_keys = require_all_keys, code = code )): return x diff --git a/ampel/view/T2DocView.py b/ampel/view/T2DocView.py index e518dbd3..3f01f5fc 100755 --- a/ampel/view/T2DocView.py +++ b/ampel/view/T2DocView.py @@ -245,7 +245,7 @@ def get_ntuple(self, for k in key ) - return None if (no_none and None in t) else t # type: ignore[return-value] + return None if (no_none and None in t) else t return None diff --git a/poetry.lock b/poetry.lock index 3f9ef199..565aad43 100644 --- a/poetry.lock +++ b/poetry.lock @@ -89,6 +89,26 @@ tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.1 [package.extras] toml = ["tomli"] +[[package]] +name = "dnspython" +version = "2.6.1" +description = "DNS toolkit" +optional = false +python-versions = ">=3.8" +files = [ + {file = "dnspython-2.6.1-py3-none-any.whl", hash = "sha256:5ef3b9680161f6fa89daf8ad451b5f1a33b18ae8a1c6778cdf4b43f08c0a6e50"}, + {file = "dnspython-2.6.1.tar.gz", hash = "sha256:e8f0f9c23a7b7cb99ded64e6c3a6f3e701d78f50c55e002b839dea7225cff7cc"}, +] + +[package.extras] +dev = ["black (>=23.1.0)", "coverage (>=7.0)", "flake8 (>=7)", "mypy (>=1.8)", "pylint (>=3)", "pytest (>=7.4)", "pytest-cov (>=4.1.0)", "sphinx (>=7.2.0)", "twine (>=4.0.0)", "wheel (>=0.42.0)"] +dnssec = ["cryptography (>=41)"] +doh = ["h2 (>=4.1.0)", "httpcore (>=1.0.0)", "httpx (>=0.26.0)"] +doq = ["aioquic (>=0.9.25)"] +idna = ["idna (>=3.6)"] +trio = ["trio (>=0.23)"] +wmi = ["wmi (>=1.5.1)"] + [[package]] name = "exceptiongroup" version = "1.2.1" @@ -183,6 +203,22 @@ files = [ {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, ] +[[package]] +name = "platformdirs" +version = "4.2.2" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." +optional = false +python-versions = ">=3.8" +files = [ + {file = "platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee"}, + {file = "platformdirs-4.2.2.tar.gz", hash = "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3"}, +] + +[package.extras] +docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] +type = ["mypy (>=1.8)"] + [[package]] name = "pluggy" version = "1.5.0" @@ -308,6 +344,87 @@ files = [ [package.dependencies] typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" +[[package]] +name = "pymongo" +version = "4.7.3" +description = "Python driver for MongoDB " +optional = false +python-versions = ">=3.7" +files = [ + {file = "pymongo-4.7.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e9580b4537b3cc5d412070caabd1dabdf73fdce249793598792bac5782ecf2eb"}, + {file = "pymongo-4.7.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:517243b2b189c98004570dd8fc0e89b1a48363d5578b3b99212fa2098b2ea4b8"}, + {file = "pymongo-4.7.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23b1e9dabd61da1c7deb54d888f952f030e9e35046cebe89309b28223345b3d9"}, + {file = "pymongo-4.7.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:03e0f9901ad66c6fb7da0d303461377524d61dab93a4e4e5af44164c5bb4db76"}, + {file = "pymongo-4.7.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9a870824aa54453aee030bac08c77ebcf2fe8999400f0c2a065bebcbcd46b7f8"}, + {file = "pymongo-4.7.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dfd7b3d3f4261bddbb74a332d87581bc523353e62bb9da4027cc7340f6fcbebc"}, + {file = "pymongo-4.7.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4d719a643ea6da46d215a3ba51dac805a773b611c641319558d8576cbe31cef8"}, + {file = "pymongo-4.7.3-cp310-cp310-win32.whl", hash = "sha256:d8b1e06f361f3c66ee694cb44326e1a2e4f93bc9c3a4849ae8547889fca71154"}, + {file = "pymongo-4.7.3-cp310-cp310-win_amd64.whl", hash = "sha256:c450ab2f9397e2d5caa7fddeb4feb30bf719c47c13ae02c0bbb3b71bf4099c1c"}, + {file = "pymongo-4.7.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:79cc6459209e885ba097779eaa0fe7f2fa049db39ab43b1731cf8d065a4650e8"}, + {file = "pymongo-4.7.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6e2287f1e2cc35e73cd74a4867e398a97962c5578a3991c730ef78d276ca8e46"}, + {file = "pymongo-4.7.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:413506bd48d8c31ee100645192171e4773550d7cb940b594d5175ac29e329ea1"}, + {file = "pymongo-4.7.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1cc1febf17646d52b7561caa762f60bdfe2cbdf3f3e70772f62eb624269f9c05"}, + {file = "pymongo-4.7.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8dfcf18a49955d50a16c92b39230bd0668ffc9c164ccdfe9d28805182b48fa72"}, + {file = "pymongo-4.7.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89872041196c008caddf905eb59d3dc2d292ae6b0282f1138418e76f3abd3ad6"}, + {file = "pymongo-4.7.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d3ed97b89de62ea927b672ad524de0d23f3a6b4a01c8d10e3d224abec973fbc3"}, + {file = "pymongo-4.7.3-cp311-cp311-win32.whl", hash = "sha256:d2f52b38151e946011d888a8441d3d75715c663fc5b41a7ade595e924e12a90a"}, + {file = "pymongo-4.7.3-cp311-cp311-win_amd64.whl", hash = "sha256:4a4cc91c28e81c0ce03d3c278e399311b0af44665668a91828aec16527082676"}, + {file = "pymongo-4.7.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:cb30c8a78f5ebaca98640943447b6a0afcb146f40b415757c9047bf4a40d07b4"}, + {file = "pymongo-4.7.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9cf2069f5d37c398186453589486ea98bb0312214c439f7d320593b61880dc05"}, + {file = "pymongo-4.7.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3564f423958fced8a8c90940fd2f543c27adbcd6c7c6ed6715d847053f6200a0"}, + {file = "pymongo-4.7.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7a8af8a38fa6951fff73e6ff955a6188f829b29fed7c5a1b739a306b4aa56fe8"}, + {file = "pymongo-4.7.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3a0e81c8dba6d825272867d487f18764cfed3c736d71d7d4ff5b79642acbed42"}, + {file = "pymongo-4.7.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88fc1d146feabac4385ea8ddb1323e584922922641303c8bf392fe1c36803463"}, + {file = "pymongo-4.7.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4225100b2c5d1f7393d7c5d256ceb8b20766830eecf869f8ae232776347625a6"}, + {file = "pymongo-4.7.3-cp312-cp312-win32.whl", hash = "sha256:5f3569ed119bf99c0f39ac9962fb5591eff02ca210fe80bb5178d7a1171c1b1e"}, + {file = "pymongo-4.7.3-cp312-cp312-win_amd64.whl", hash = "sha256:eb383c54c0c8ba27e7712b954fcf2a0905fee82a929d277e2e94ad3a5ba3c7db"}, + {file = "pymongo-4.7.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a46cffe91912570151617d866a25d07b9539433a32231ca7e7cf809b6ba1745f"}, + {file = "pymongo-4.7.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4c3cba427dac50944c050c96d958c5e643c33a457acee03bae27c8990c5b9c16"}, + {file = "pymongo-4.7.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a7a5fd893edbeb7fa982f8d44b6dd0186b6cd86c89e23f6ef95049ff72bffe46"}, + {file = "pymongo-4.7.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c168a2fadc8b19071d0a9a4f85fe38f3029fe22163db04b4d5c046041c0b14bd"}, + {file = "pymongo-4.7.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2c59c2c9e70f63a7f18a31e367898248c39c068c639b0579623776f637e8f482"}, + {file = "pymongo-4.7.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d08165fd82c89d372e82904c3268bd8fe5de44f92a00e97bb1db1785154397d9"}, + {file = "pymongo-4.7.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:397fed21afec4fdaecf72f9c4344b692e489756030a9c6d864393e00c7e80491"}, + {file = "pymongo-4.7.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:f903075f8625e2d228f1b9b9a0cf1385f1c41e93c03fd7536c91780a0fb2e98f"}, + {file = "pymongo-4.7.3-cp37-cp37m-win32.whl", hash = "sha256:8ed1132f58c38add6b6138b771d0477a3833023c015c455d9a6e26f367f9eb5c"}, + {file = "pymongo-4.7.3-cp37-cp37m-win_amd64.whl", hash = "sha256:8d00a5d8fc1043a4f641cbb321da766699393f1b6f87c70fae8089d61c9c9c54"}, + {file = "pymongo-4.7.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9377b868c38700c7557aac1bc4baae29f47f1d279cc76b60436e547fd643318c"}, + {file = "pymongo-4.7.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:da4a6a7b4f45329bb135aa5096823637bd5f760b44d6224f98190ee367b6b5dd"}, + {file = "pymongo-4.7.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:487e2f9277f8a63ac89335ec4f1699ae0d96ebd06d239480d69ed25473a71b2c"}, + {file = "pymongo-4.7.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6db3d608d541a444c84f0bfc7bad80b0b897e0f4afa580a53f9a944065d9b633"}, + {file = "pymongo-4.7.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e90af2ad3a8a7c295f4d09a2fbcb9a350c76d6865f787c07fe843b79c6e821d1"}, + {file = "pymongo-4.7.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8e28feb18dc559d50ededba27f9054c79f80c4edd70a826cecfe68f3266807b3"}, + {file = "pymongo-4.7.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f21ecddcba2d9132d5aebd8e959de8d318c29892d0718420447baf2b9bccbb19"}, + {file = "pymongo-4.7.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:26140fbb3f6a9a74bd73ed46d0b1f43d5702e87a6e453a31b24fad9c19df9358"}, + {file = "pymongo-4.7.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:94baa5fc7f7d22c3ce2ac7bd92f7e03ba7a6875f2480e3b97a400163d6eaafc9"}, + {file = "pymongo-4.7.3-cp38-cp38-win32.whl", hash = "sha256:92dd247727dd83d1903e495acc743ebd757f030177df289e3ba4ef8a8c561fad"}, + {file = "pymongo-4.7.3-cp38-cp38-win_amd64.whl", hash = "sha256:1c90c848a5e45475731c35097f43026b88ef14a771dfd08f20b67adc160a3f79"}, + {file = "pymongo-4.7.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f598be401b416319a535c386ac84f51df38663f7a9d1071922bda4d491564422"}, + {file = "pymongo-4.7.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:35ba90477fae61c65def6e7d09e8040edfdd3b7fd47c3c258b4edded60c4d625"}, + {file = "pymongo-4.7.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9aa8735955c70892634d7e61b0ede9b1eefffd3cd09ccabee0ffcf1bdfe62254"}, + {file = "pymongo-4.7.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:82a97d8f7f138586d9d0a0cff804a045cdbbfcfc1cd6bba542b151e284fbbec5"}, + {file = "pymongo-4.7.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de3b9db558930efab5eaef4db46dcad8bf61ac3ddfd5751b3e5ac6084a25e366"}, + {file = "pymongo-4.7.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0e149217ef62812d3c2401cf0e2852b0c57fd155297ecc4dcd67172c4eca402"}, + {file = "pymongo-4.7.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3a8a1ef4a824f5feb793b3231526d0045eadb5eb01080e38435dfc40a26c3e5"}, + {file = "pymongo-4.7.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d14e5e89a4be1f10efc3d9dcb13eb7a3b2334599cb6bb5d06c6a9281b79c8e22"}, + {file = "pymongo-4.7.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:c6bfa29f032fd4fd7b129520f8cdb51ab71d88c2ba0567cccd05d325f963acb5"}, + {file = "pymongo-4.7.3-cp39-cp39-win32.whl", hash = "sha256:1421d0bd2ce629405f5157bd1aaa9b83f12d53a207cf68a43334f4e4ee312b66"}, + {file = "pymongo-4.7.3-cp39-cp39-win_amd64.whl", hash = "sha256:f7ee974f8b9370a998919c55b1050889f43815ab588890212023fecbc0402a6d"}, + {file = "pymongo-4.7.3.tar.gz", hash = "sha256:6354a66b228f2cd399be7429685fb68e07f19110a3679782ecb4fdb68da03831"}, +] + +[package.dependencies] +dnspython = ">=1.16.0,<3.0.0" + +[package.extras] +aws = ["pymongo-auth-aws (>=1.1.0,<2.0.0)"] +encryption = ["certifi", "pymongo-auth-aws (>=1.1.0,<2.0.0)", "pymongocrypt (>=1.6.0,<2.0.0)"] +gssapi = ["pykerberos", "winkerberos (>=0.5.0)"] +ocsp = ["certifi", "cryptography (>=2.5)", "pyopenssl (>=17.2.0)", "requests (<3.0.0)", "service-identity (>=18.1.0)"] +snappy = ["python-snappy"] +test = ["pytest (>=7)"] +zstd = ["zstandard"] + [[package]] name = "pytest" version = "8.2.1" @@ -716,4 +833,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "485ecf34e3aff31a8f9c49d54e8bddc68f0c062cdee5f1920e60e633da801366" +content-hash = "1a7443b73f837845576d3ad4e6ebc91f9fa0e95e6d9aa1bbf940f05e1c881194" diff --git a/pyproject.toml b/pyproject.toml index fc5c7740..3ee1c709 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ampel-interface" -version = "0.10.1.post0" +version = "0.10.2a0" description = "Base classes for the Ampel analysis platform" authors = ["Valery Brinnel"] maintainers = ["Jakob van Santen "] @@ -22,6 +22,7 @@ pydantic = "^2.7" xxhash = "^3.0.0" PyYAML = "^6.0.0" ujson = "^5.1.0" +platformdirs = "^4.2.2" [tool.poetry.dev-dependencies] pytest = "^8.2.1" @@ -33,6 +34,7 @@ types-setuptools = "^65.3.0" [tool.poetry.group.dev.dependencies] pytest-mock = "^3.12.0" ruff = "^0.4.0" +pymongo = "^4.7.3" [build-system] requires = ["poetry-core>=1.0.0", "setuptools>=40.8.0"] @@ -52,12 +54,17 @@ namespace_packages = true show_error_codes = true check_untyped_defs = true disallow_untyped_calls = true +warn_unused_ignores = true +enable_error_code = "ignore-without-code" plugins = [ "pydantic.mypy" ] packages = [ "ampel" ] +exclude = [ + "ampel/base/AlternativeAmpelBaseModel.py" +] [tool.pydantic-mypy] init_typed = true @@ -66,10 +73,6 @@ init_typed = true module = "ampel.abstract.*" disable_error_code = "empty-body" -[[tool.mypy.overrides]] -module = "bson.*" -ignore_missing_imports = true - [tool.ruff] target-version = "py310" exclude = [