diff --git a/.gitignore b/.gitignore index 7088d3650..65136a406 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ _version.py .DS_Store .envrc .hypothesis -.mypy_cache .pytest_cache .vscode *.aux diff --git a/pyproject.toml b/pyproject.toml index ab787d24c..e6aae2e30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -96,23 +96,6 @@ run = {branch = true, parallel = true, source = [ "sleplet", ]} -[tool.mypy] -disallow_subclassing_any = false -disallow_untyped_decorators = false -enable_error_code = [ - "ignore-without-code", - "redundant-expr", - "truthy-bool", -] -explicit_package_bases = true -ignore_missing_imports = true -plugins = [ - "pydantic.mypy", -] -strict = true -warn_return_any = false -warn_unreachable = true - [tool.pytest.ini_options] addopts = [ "--color=yes", @@ -191,3 +174,11 @@ write_to = "src/sleplet/_version.py" [tool.tomlsort] overrides."project.classifiers".inline_arrays = false overrides."tool.ruff.lint.isort.section-order".inline_arrays = false + +[tool.ty] +rules.invalid-argument-type = "ignore" +rules.unresolved-attribute = "ignore" +src.include = [ + "src", + "tests", +] diff --git a/src/sleplet/_convolution_methods.py b/src/sleplet/_convolution_methods.py index ade3c1645..f49c33e69 100644 --- a/src/sleplet/_convolution_methods.py +++ b/src/sleplet/_convolution_methods.py @@ -16,4 +16,4 @@ def sifting_convolution( if len(g_coefficient.shape) < len(f_coefficient.shape) else g_coefficient ) - return (f_coefficient.T[:n] * g_reshape.conj().T[:n]).T # type: ignore[return-value] + return (f_coefficient.T[:n] * g_reshape.conj().T[:n]).T # ty: ignore[invalid-return-type] diff --git a/src/sleplet/_data/setup_pooch.py b/src/sleplet/_data/setup_pooch.py index 4b2bd7c2d..8aa9df68e 100644 --- a/src/sleplet/_data/setup_pooch.py +++ b/src/sleplet/_data/setup_pooch.py @@ -65,10 +65,10 @@ def find_on_pooch_then_local(filename: str) -> os.PathLike[str] | None: Returns: The sought after file or nothing if not found """ - if filename in _POOCH.registry: # type: ignore[union-attr] + if filename in _POOCH.registry: msg = f"Found {filename} at https://doi.org/{_ZENODO_DATA_DOI}" _logger.info(msg) - return _POOCH.fetch(filename, progressbar=True) # type: ignore[union-attr] + return _POOCH.fetch(filename, progressbar=True) if (platformdirs.user_data_path() / filename).exists(): msg = f"Found {filename} at {platformdirs.user_data_path() / filename}" diff --git a/src/sleplet/_mesh_methods.py b/src/sleplet/_mesh_methods.py index d461d3f72..acee7fca1 100644 --- a/src/sleplet/_mesh_methods.py +++ b/src/sleplet/_mesh_methods.py @@ -113,12 +113,12 @@ def mesh_eigendecomposition( def read_mesh( mesh_config: dict[str, float | int | str], -) -> tuple[npt.NDArray[np.float64], npt.NDArray[np.int_]]: +) -> tuple[npt.NDArray[np.float64], npt.NDArray[np.int_]]: # ty: ignore[invalid-return-type] """Read in the given mesh.""" vertices, faces = igl.read_triangle_mesh( _data_path / f"meshes_polygons_{mesh_config['FILENAME']}", ) - return igl.upsample(vertices, faces, number_of_subdivs=mesh_config["UPSAMPLE"]) + return igl.upsample(vertices, faces, number_of_subdivs=mesh_config["UPSAMPLE"]) # ty: ignore[invalid-return-type] def _mesh_laplacian( diff --git a/src/sleplet/_scripts/plotting_on_sphere.py b/src/sleplet/_scripts/plotting_on_sphere.py index 1b0d9839c..2c3d405fd 100644 --- a/src/sleplet/_scripts/plotting_on_sphere.py +++ b/src/sleplet/_scripts/plotting_on_sphere.py @@ -330,7 +330,7 @@ def _translation_helper( "z": z, "arrowcolor": _ANNOTATION_COLOUR, } | _ARROW_STYLE - return coefficients, filename, annotation + return coefficients, filename, annotation # ty: ignore[invalid-return-type] def _convolution_helper( diff --git a/src/sleplet/functions/slepian.py b/src/sleplet/functions/slepian.py index 649b2e32f..955d1c1dc 100644 --- a/src/sleplet/functions/slepian.py +++ b/src/sleplet/functions/slepian.py @@ -28,14 +28,14 @@ def __post_init__(self: typing_extensions.Self) -> None: def _create_name(self: typing_extensions.Self) -> str: order = ( - f"_m{self.slepian.order[self.rank]}" + f"_m{self.slepian.order[self.rank]}" # ty: ignore[non-subscriptable] if hasattr(self.slepian, "order") else "" ) return ( ( - f"{self.slepian.name}{order}_rank{self.rank}" - f"_lam{self.slepian.eigenvalues[self.rank]:e}" + f"{self.slepian.name}{order}_rank{self.rank}" # ty: ignore[possibly-missing-attribute] + f"_lam{self.slepian.eigenvalues[self.rank]:e}" # ty: ignore[possibly-missing-attribute] ) .replace(".", "-") .replace("+", "") @@ -45,14 +45,14 @@ def _create_coefficients( self: typing_extensions.Self, ) -> npt.NDArray[np.complex128 | np.float64]: msg = ( - f"Shannon number: {self.slepian.N}\n" - f"Eigenvalue {self.rank}: {self.slepian.eigenvalues[self.rank]:e}" + f"Shannon number: {self.slepian.N}\n" # ty: ignore[possibly-missing-attribute] + f"Eigenvalue {self.rank}: {self.slepian.eigenvalues[self.rank]:e}" # ty: ignore[possibly-missing-attribute] ) _logger.info(msg) return sleplet.slepian_methods.slepian_forward( self.L, self.slepian, - flm=self.slepian.eigenvectors[self.rank], + flm=self.slepian.eigenvectors[self.rank], # ty: ignore[possibly-missing-attribute] ) def _set_reality(self: typing_extensions.Self) -> bool: diff --git a/src/sleplet/functions/slepian_dirac_delta.py b/src/sleplet/functions/slepian_dirac_delta.py index 54a4d1679..af69e0967 100644 --- a/src/sleplet/functions/slepian_dirac_delta.py +++ b/src/sleplet/functions/slepian_dirac_delta.py @@ -42,7 +42,7 @@ def _create_coefficients( def _create_name(self: typing_extensions.Self) -> str: return ( f"{sleplet._string_methods._convert_camel_case_to_snake_case(self.__class__.__name__)}" - f"_{self.slepian.region._name_ending}" + f"_{self.slepian.region._name_ending}" # ty: ignore[possibly-missing-attribute] ) def _set_reality(self: typing_extensions.Self) -> bool: @@ -64,7 +64,7 @@ def _compute_angles(self: typing_extensions.Self) -> None: Method=sleplet._vars.SAMPLING_SCHEME, ) sp = ssht.inverse( - self.slepian.eigenvectors[0], + self.slepian.eigenvectors[0], # ty: ignore[possibly-missing-attribute] self.L, Method=sleplet._vars.SAMPLING_SCHEME, ) diff --git a/src/sleplet/functions/slepian_identity.py b/src/sleplet/functions/slepian_identity.py index 44dda60be..4627625bc 100644 --- a/src/sleplet/functions/slepian_identity.py +++ b/src/sleplet/functions/slepian_identity.py @@ -25,7 +25,7 @@ def _create_coefficients( def _create_name(self: typing_extensions.Self) -> str: return ( f"{sleplet._string_methods._convert_camel_case_to_snake_case(self.__class__.__name__)}" - f"_{self.slepian.region._name_ending}" + f"_{self.slepian.region._name_ending}" # ty: ignore[possibly-missing-attribute] ) def _set_reality(self: typing_extensions.Self) -> bool: diff --git a/src/sleplet/functions/slepian_wavelet_coefficients_africa.py b/src/sleplet/functions/slepian_wavelet_coefficients_africa.py index a1ece446f..a13b4edb9 100644 --- a/src/sleplet/functions/slepian_wavelet_coefficients_africa.py +++ b/src/sleplet/functions/slepian_wavelet_coefficients_africa.py @@ -91,9 +91,9 @@ def _create_wavelet_coefficients( wavelet_coefficients = sleplet.wavelet_methods.slepian_wavelet_forward( sa.coefficients, wavelets, - self.slepian.N, + self.slepian.N, # ty: ignore[possibly-missing-attribute] ) - return wavelets, wavelet_coefficients + return wavelets, wavelet_coefficients # ty: ignore[invalid-return-type] @pydantic.field_validator("j") def _check_j( diff --git a/src/sleplet/functions/slepian_wavelet_coefficients_south_america.py b/src/sleplet/functions/slepian_wavelet_coefficients_south_america.py index b58051c1e..b69adfe62 100644 --- a/src/sleplet/functions/slepian_wavelet_coefficients_south_america.py +++ b/src/sleplet/functions/slepian_wavelet_coefficients_south_america.py @@ -91,9 +91,9 @@ def _create_wavelet_coefficients( wavelet_coefficients = sleplet.wavelet_methods.slepian_wavelet_forward( sa.coefficients, wavelets, - self.slepian.N, + self.slepian.N, # ty: ignore[possibly-missing-attribute] ) - return wavelets, wavelet_coefficients + return wavelets, wavelet_coefficients # ty: ignore[invalid-return-type] @pydantic.field_validator("j") def _check_j( diff --git a/src/sleplet/functions/slepian_wavelets.py b/src/sleplet/functions/slepian_wavelets.py index 691614afc..68ed59a4c 100644 --- a/src/sleplet/functions/slepian_wavelets.py +++ b/src/sleplet/functions/slepian_wavelets.py @@ -44,7 +44,7 @@ def _create_coefficients( def _create_name(self: typing_extensions.Self) -> str: return ( f"{sleplet._string_methods._convert_camel_case_to_snake_case(self.__class__.__name__)}" - f"_{self.slepian.region._name_ending}" + f"_{self.slepian.region._name_ending}" # ty: ignore[possibly-missing-attribute] f"{sleplet._string_methods.filename_args(self.B, 'B')}" f"{sleplet._string_methods.filename_args(self.j_min, 'jmin')}" f"{sleplet._string_methods.wavelet_ending(self.j_min, self.j)}" diff --git a/src/sleplet/meshes/_mesh_slepian_decomposition.py b/src/sleplet/meshes/_mesh_slepian_decomposition.py index 94160194d..e6bf82dd0 100644 --- a/src/sleplet/meshes/_mesh_slepian_decomposition.py +++ b/src/sleplet/meshes/_mesh_slepian_decomposition.py @@ -120,7 +120,7 @@ def _validate_rank(self: typing_extensions.Self, rank: int) -> None: if rank < 0: msg = "rank cannot be negative" raise ValueError(msg) - if rank >= self.mesh_slepian.mesh.number_basis_functions: + if rank >= self.mesh_slepian.mesh.number_basis_functions: # ty: ignore[unsupported-operator] msg = ( "rank should be less than " f"{self.mesh_slepian.mesh.number_basis_functions}" diff --git a/src/sleplet/meshes/mesh.py b/src/sleplet/meshes/mesh.py index 3e0d7038d..bfb41c3f5 100644 --- a/src/sleplet/meshes/mesh.py +++ b/src/sleplet/meshes/mesh.py @@ -70,12 +70,12 @@ def __post_init__(self: typing_extensions.Self) -> None: y_centre=mesh_config["CENTRE_Y"] if self.zoom else 0, z_centre=mesh_config["CENTRE_Z"] if self.zoom else 0, ) - self._colourbar_pos = ( + self._colourbar_pos = ( # ty: ignore[invalid-assignment] mesh_config["REGION_COLOURBAR_POS"] if self.zoom else mesh_config["DEFAULT_COLOURBAR_POS"] ) - self.vertices, self.faces = sleplet._mesh_methods.read_mesh(mesh_config) + self.vertices, self.faces = sleplet._mesh_methods.read_mesh(mesh_config) # ty: ignore[invalid-assignment] self.mesh_region = sleplet._mesh_methods.create_mesh_region( mesh_config, self.vertices, diff --git a/src/sleplet/meshes/mesh_field.py b/src/sleplet/meshes/mesh_field.py index a6b185eef..ef93bf05b 100644 --- a/src/sleplet/meshes/mesh_field.py +++ b/src/sleplet/meshes/mesh_field.py @@ -22,7 +22,7 @@ def _create_coefficients( self: typing_extensions.Self, ) -> npt.NDArray[np.complex128 | np.float64]: """Compute field on the vertices of the mesh.""" - field = igl.per_vertex_normals(self.mesh.vertices, self.mesh.faces)[:, 1] + field = igl.per_vertex_normals(self.mesh.vertices, self.mesh.faces)[:, 1] # ty: ignore[non-subscriptable] return sleplet.harmonic_methods.mesh_forward(self.mesh, field) def _create_name(self: typing_extensions.Self) -> str: diff --git a/src/sleplet/meshes/mesh_harmonic_coefficients.py b/src/sleplet/meshes/mesh_harmonic_coefficients.py index 0e2602542..fb3faa978 100644 --- a/src/sleplet/meshes/mesh_harmonic_coefficients.py +++ b/src/sleplet/meshes/mesh_harmonic_coefficients.py @@ -28,7 +28,7 @@ def _add_noise_to_signal( unnoised_coefficients = self.coefficients.copy() nlm = sleplet.noise._create_mesh_noise(self.coefficients, self.noise) snr = sleplet.noise.compute_snr(self.coefficients, nlm, "Harmonic") - self.coefficients = self.coefficients + nlm + self.coefficients = self.coefficients + nlm # ty: ignore[invalid-assignment] return unnoised_coefficients, snr return None, None diff --git a/src/sleplet/meshes/mesh_slepian_coefficients.py b/src/sleplet/meshes/mesh_slepian_coefficients.py index 8a14276b0..6849266b7 100644 --- a/src/sleplet/meshes/mesh_slepian_coefficients.py +++ b/src/sleplet/meshes/mesh_slepian_coefficients.py @@ -40,7 +40,7 @@ def _add_noise_to_signal( self.noise, ) snr = sleplet.noise.compute_snr(self.coefficients, n_p, "Slepian") - self.coefficients = self.coefficients + n_p + self.coefficients = self.coefficients + n_p # ty: ignore[invalid-assignment] return unnoised_coefficients, snr return None, None diff --git a/src/sleplet/meshes/mesh_slepian_functions.py b/src/sleplet/meshes/mesh_slepian_functions.py index db69badae..fda67d829 100644 --- a/src/sleplet/meshes/mesh_slepian_functions.py +++ b/src/sleplet/meshes/mesh_slepian_functions.py @@ -31,10 +31,10 @@ def _create_coefficients( """Compute field on the vertices of the mesh.""" msg = ( f"Slepian eigenvalue {self.rank}: " - f"{self.mesh_slepian.slepian_eigenvalues[self.rank]:e}", + f"{self.mesh_slepian.slepian_eigenvalues[self.rank]:e}", # ty: ignore[possibly-missing-attribute] ) _logger.info(msg) - s_p_i = self.mesh_slepian.slepian_functions[self.rank] + s_p_i = self.mesh_slepian.slepian_functions[self.rank] # ty: ignore[possibly-missing-attribute] return sleplet.slepian_methods.slepian_mesh_forward( self.mesh_slepian, u_i=s_p_i, @@ -44,7 +44,7 @@ def _create_name(self: typing_extensions.Self) -> str: return ( ( f"slepian_{self.mesh.name}_rank{self.rank}_" - f"lam{self.mesh_slepian.slepian_eigenvalues[self.rank]:e}" + f"lam{self.mesh_slepian.slepian_eigenvalues[self.rank]:e}" # ty: ignore[possibly-missing-attribute] ) .replace(".", "-") .replace("+", "") diff --git a/src/sleplet/meshes/mesh_slepian_wavelet_coefficients.py b/src/sleplet/meshes/mesh_slepian_wavelet_coefficients.py index 6a3db553c..a4cad15c9 100644 --- a/src/sleplet/meshes/mesh_slepian_wavelet_coefficients.py +++ b/src/sleplet/meshes/mesh_slepian_wavelet_coefficients.py @@ -75,7 +75,7 @@ def _create_wavelet_coefficients( wavelet_coefficients = sleplet.wavelet_methods.slepian_wavelet_forward( smf.coefficients, wavelets, - self.mesh_slepian.N, + self.mesh_slepian.N, # ty: ignore[possibly-missing-attribute] ) return wavelets, wavelet_coefficients diff --git a/src/sleplet/slepian/slepian_limit_lat_lon.py b/src/sleplet/slepian/slepian_limit_lat_lon.py index 78c99a94e..4e6ddf5dc 100644 --- a/src/sleplet/slepian/slepian_limit_lat_lon.py +++ b/src/sleplet/slepian/slepian_limit_lat_lon.py @@ -179,7 +179,7 @@ def _slepian_matrix( """ K = np.zeros((L**2, L**2), dtype=np.complex128) - for ell in numba.prange(L): + for ell in numba.prange(L): # ty: ignore[not-iterable] for p in range(ell + 1): C1 = np.sqrt((2 * ell + 1) * (2 * p + 1)) / (4 * np.pi) diff --git a/tests/conftest.py b/tests/conftest.py index d64384e34..19dc771ec 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,6 +3,7 @@ import pytest import sleplet +import sleplet._vars ARRAY_DIM = 10 L = 16 diff --git a/tests/test_arrays.py b/tests/test_arrays.py index dc26ba653..0fe4b6c63 100644 --- a/tests/test_arrays.py +++ b/tests/test_arrays.py @@ -1,6 +1,6 @@ import numpy as np -import sleplet +import sleplet._array_methods def test_fill_matrix_using_hermitian_relation() -> None: diff --git a/tests/test_bool.py b/tests/test_bool.py index 17bdd7280..901cca761 100644 --- a/tests/test_bool.py +++ b/tests/test_bool.py @@ -1,6 +1,8 @@ import numpy as np import sleplet +import sleplet._bool_methods +import sleplet._vars J = 2 J_MIN = 0 diff --git a/tests/test_decomposition.py b/tests/test_decomposition.py index 769357d06..f6fd6f4f1 100644 --- a/tests/test_decomposition.py +++ b/tests/test_decomposition.py @@ -3,6 +3,9 @@ import pyssht as ssht import sleplet +import sleplet._mask_methods +import sleplet._vars +import sleplet.slepian._slepian_decomposition def test_decompose_all_polar( diff --git a/tests/test_harmonic.py b/tests/test_harmonic.py index 60519edb3..b48f4a3ec 100644 --- a/tests/test_harmonic.py +++ b/tests/test_harmonic.py @@ -4,6 +4,7 @@ import pyssht as ssht import sleplet +import sleplet._vars L_LARGE = 128 L_SMALL = 16 diff --git a/tests/test_loading_pooch.py b/tests/test_loading_pooch.py index fa01bbb99..5f8506460 100644 --- a/tests/test_loading_pooch.py +++ b/tests/test_loading_pooch.py @@ -1,6 +1,6 @@ import pathlib -import sleplet +import sleplet._data.setup_pooch def test_known_file_exists_on_pooch() -> None: diff --git a/tests/test_mesh.py b/tests/test_mesh.py index e84c3c050..cebbc8cfb 100644 --- a/tests/test_mesh.py +++ b/tests/test_mesh.py @@ -1,6 +1,7 @@ import numpy as np import sleplet +import sleplet._integration_methods def test_inverse_forward_transform_recovery( diff --git a/tests/test_parallel.py b/tests/test_parallel.py index 2f81c1d1a..28c212ce4 100644 --- a/tests/test_parallel.py +++ b/tests/test_parallel.py @@ -1,6 +1,6 @@ import numpy as np -import sleplet +import sleplet._parallel_methods L_LARGE = 128 L_SMALL = 16 diff --git a/tests/test_slepian_mesh.py b/tests/test_slepian_mesh.py index ef61799f8..f761bf41c 100644 --- a/tests/test_slepian_mesh.py +++ b/tests/test_slepian_mesh.py @@ -70,15 +70,15 @@ def test_synthesis_mesh( wav_coeffs = sleplet.wavelet_methods.slepian_wavelet_forward( coefficients, mesh_slepian_wavelets.wavelets, - mesh_slepian_wavelets.mesh_slepian.N, + mesh_slepian_wavelets.mesh_slepian.N, # ty: ignore[possibly-missing-attribute] ) f_p = sleplet.wavelet_methods.slepian_wavelet_inverse( wav_coeffs, mesh_slepian_wavelets.wavelets, - mesh_slepian_wavelets.mesh_slepian.N, + mesh_slepian_wavelets.mesh_slepian.N, # ty: ignore[possibly-missing-attribute] ) np.testing.assert_allclose( - np.abs(f_p - coefficients)[: mesh_slepian_wavelets.mesh_slepian.N].mean(), + np.abs(f_p - coefficients)[: mesh_slepian_wavelets.mesh_slepian.N].mean(), # ty: ignore[possibly-missing-attribute] 0, atol=1e-16, ) diff --git a/tests/test_strings.py b/tests/test_strings.py index 2734b1ca2..0cc12ab9e 100644 --- a/tests/test_strings.py +++ b/tests/test_strings.py @@ -1,6 +1,7 @@ import numpy as np import sleplet +import sleplet._string_methods J_MIN = 0 PHI_0 = np.pi / 6 diff --git a/tests/test_translation.py b/tests/test_translation.py index a1f611e07..b1a91e86a 100644 --- a/tests/test_translation.py +++ b/tests/test_translation.py @@ -1,9 +1,10 @@ -import hypothesis +import hypothesis.strategies import numpy as np import pyssht as ssht import sleplet +import sleplet._vars L = 128 THETA_MAX = np.pi / 3 @@ -53,7 +54,7 @@ def test_slepian_translation_changes_max_polar( sdd_trans = slepian_dirac_delta_polar_cap.translate( slepian_dirac_delta_polar_cap._alpha, beta, - shannon=slepian_dirac_delta_polar_cap.slepian.N, + shannon=slepian_dirac_delta_polar_cap.slepian.N, # ty: ignore[possibly-missing-attribute] ) field = sleplet.slepian_methods.slepian_inverse( sdd_trans, @@ -86,7 +87,7 @@ def test_slepian_translation_changes_max_lim_lat_lon( sdd_trans = slepian_dirac_delta_lim_lat_lon.translate( slepian_dirac_delta_lim_lat_lon._alpha, beta, - shannon=slepian_dirac_delta_lim_lat_lon.slepian.N, + shannon=slepian_dirac_delta_lim_lat_lon.slepian.N, # ty: ignore[possibly-missing-attribute] ) field = sleplet.slepian_methods.slepian_inverse( sdd_trans, diff --git a/tests/test_wavelets.py b/tests/test_wavelets.py index 237a96cee..9fe8beb37 100644 --- a/tests/test_wavelets.py +++ b/tests/test_wavelets.py @@ -24,12 +24,12 @@ def test_synthesis_polar( wav_coeffs = sleplet.wavelet_methods.slepian_wavelet_forward( coefficients, slepian_wavelets_polar_cap.wavelets, - slepian_wavelets_polar_cap.slepian.N, + slepian_wavelets_polar_cap.slepian.N, # ty: ignore[possibly-missing-attribute] ) f_p = sleplet.wavelet_methods.slepian_wavelet_inverse( wav_coeffs, slepian_wavelets_polar_cap.wavelets, - slepian_wavelets_polar_cap.slepian.N, + slepian_wavelets_polar_cap.slepian.N, # ty: ignore[possibly-missing-attribute] ) np.testing.assert_allclose(np.abs(f_p - coefficients).mean(), 0, atol=1e-14) @@ -47,12 +47,12 @@ def test_synthesis_lim_lat_lon( wav_coeffs = sleplet.wavelet_methods.slepian_wavelet_forward( coefficients, slepian_wavelets_lim_lat_lon.wavelets, - slepian_wavelets_lim_lat_lon.slepian.N, + slepian_wavelets_lim_lat_lon.slepian.N, # ty: ignore[possibly-missing-attribute] ) f_p = sleplet.wavelet_methods.slepian_wavelet_inverse( wav_coeffs, slepian_wavelets_lim_lat_lon.wavelets, - slepian_wavelets_lim_lat_lon.slepian.N, + slepian_wavelets_lim_lat_lon.slepian.N, # ty: ignore[possibly-missing-attribute] ) np.testing.assert_allclose(np.abs(f_p - coefficients).mean(), 0, atol=0) @@ -70,7 +70,7 @@ def test_axisymmetric_synthesis_earth() -> None: awc.wavelets, ) np.testing.assert_allclose( - np.abs(flm - awc._earth.coefficients).mean(), + np.abs(flm - awc._earth.coefficients).mean(), # ty: ignore[possibly-missing-attribute] 0, atol=1e-13, ) @@ -89,7 +89,7 @@ def test_axisymmetric_synthesis_south_america() -> None: awc.wavelets, ) np.testing.assert_allclose( - np.abs(flm - awc._south_america.coefficients).mean(), + np.abs(flm - awc._south_america.coefficients).mean(), # ty: ignore[possibly-missing-attribute] 0, atol=1e-14, )