************* Module precon3d.mosaic_utils src/precon3d/mosaic_utils.py:26:0: E0401: Unable to import 'numpy' (import-error) src/precon3d/mosaic_utils.py:27:0: E0401: Unable to import 'skimage.io' (import-error) src/precon3d/mosaic_utils.py:28:0: E0401: Unable to import 'skimage.transform' (import-error) src/precon3d/mosaic_utils.py:29:0: E0401: Unable to import 'PIL' (import-error) src/precon3d/mosaic_utils.py:30:0: E0401: Unable to import 'aicspylibczi' (import-error) src/precon3d/mosaic_utils.py:31:0: E0401: Unable to import 'aicsimageio' (import-error) src/precon3d/mosaic_utils.py:32:0: E0401: Unable to import 'matplotlib.pyplot' (import-error) src/precon3d/mosaic_utils.py:33:0: R0402: Use 'from matplotlib import patches' instead (consider-using-from-import) src/precon3d/mosaic_utils.py:33:0: E0401: Unable to import 'matplotlib.patches' (import-error) src/precon3d/mosaic_utils.py:36:0: E0401: Unable to import 'matplotlib.backends.backend_tkagg' (import-error) src/precon3d/mosaic_utils.py:140:0: R0914: Too many local variables (16/15) (too-many-locals) src/precon3d/mosaic_utils.py:185:0: R0914: Too many local variables (17/15) (too-many-locals) src/precon3d/mosaic_utils.py:259:20: W0613: Unused argument 'evt' (unused-argument) src/precon3d/mosaic_utils.py:266:0: R0914: Too many local variables (22/15) (too-many-locals) src/precon3d/mosaic_utils.py:276:4: W0612: Unused variable 'n' (unused-variable) src/precon3d/mosaic_utils.py:305:0: R0914: Too many local variables (25/15) (too-many-locals) src/precon3d/mosaic_utils.py:318:8: W0612: Unused variable 'n' (unused-variable) src/precon3d/mosaic_utils.py:422:0: R0914: Too many local variables (22/15) (too-many-locals) src/precon3d/mosaic_utils.py:471:11: W1510: 'subprocess.run' used without explicitly defining the value for 'check'. (subprocess-run-check) src/precon3d/mosaic_utils.py:488:15: W0718: Catching too general exception Exception (broad-exception-caught) src/precon3d/mosaic_utils.py:503:42: W0613: Unused argument 'cleanup' (unused-argument) src/precon3d/mosaic_utils.py:649:8: W0612: Unused variable 'fig' (unused-variable) src/precon3d/mosaic_utils.py:34:0: C0411: standard import "tkinter" should be placed before third party imports "numpy", "skimage.io", "skimage.transform" (...) "aicsimageio.AICSImage", "matplotlib.pyplot", "matplotlib.patches" (wrong-import-order) src/precon3d/mosaic_utils.py:35:0: C0411: standard import "tkinter.ttk" should be placed before third party imports "numpy", "skimage.io", "skimage.transform" (...) "aicsimageio.AICSImage", "matplotlib.pyplot", "matplotlib.patches" (wrong-import-order) src/precon3d/mosaic_utils.py:24:0: W0611: Unused Optional imported from typing (unused-import) ************* Module precon3d.main src/precon3d/main.py:4:0: C0301: Line too long (101/100) (line-too-long) src/precon3d/main.py:1:0: C0114: Missing module docstring (missing-module-docstring) src/precon3d/main.py:1:0: E0401: Unable to import 'typer' (import-error) src/precon3d/main.py:3:0: C0410: Multiple imports on one line (precon3d.aligner, precon3d.shading_correction, precon3d.stitcher, precon3d.post_stitch_utils) (multiple-imports) src/precon3d/main.py:4:0: C0410: Multiple imports on one line (precon3d.downscaler, precon3d.cropper, precon3d.resampler, precon3d.utility, precon3d.czi_info) (multiple-imports) ************* Module precon3d.czi_info src/precon3d/czi_info.py:48:0: C0301: Line too long (102/100) (line-too-long) src/precon3d/czi_info.py:88:0: C0301: Line too long (113/100) (line-too-long) src/precon3d/czi_info.py:16:0: E0401: Unable to import 'numpy' (import-error) src/precon3d/czi_info.py:17:0: E0401: Unable to import 'pytz' (import-error) src/precon3d/czi_info.py:18:0: E0401: Unable to import 'dateutil' (import-error) src/precon3d/czi_info.py:19:0: E0401: Unable to import 'typer' (import-error) src/precon3d/czi_info.py:20:0: E0401: Unable to import 'aicspylibczi' (import-error) src/precon3d/czi_info.py:25:0: W0401: Wildcard import precon3d.custom_types (wildcard-import) src/precon3d/czi_info.py:540:20: E1101: Module 'precon3d.mosaic_utils' has no 'save_tile_by_idx' member (no-member) src/precon3d/czi_info.py:553:20: E1101: Module 'precon3d.mosaic_utils' has no 'save_tile_by_idx' member (no-member) src/precon3d/czi_info.py:8:0: W0611: Unused datetime imported from datetime (unused-import) src/precon3d/czi_info.py:10:0: W0611: Unused Final imported from typing (unused-import) src/precon3d/czi_info.py:10:0: W0611: Unused Tuple imported from typing (unused-import) src/precon3d/czi_info.py:10:0: W0611: Unused NamedTuple imported from typing (unused-import) src/precon3d/czi_info.py:10:0: W0611: Unused Union imported from typing (unused-import) src/precon3d/czi_info.py:10:0: W0611: Unused Optional imported from typing (unused-import) src/precon3d/czi_info.py:13:0: W0611: Unused import math (unused-import) src/precon3d/czi_info.py:17:0: W0611: Unused import pytz (unused-import) src/precon3d/czi_info.py:25:0: W0614: Unused import(s) npt, ValueExpectedTrueError, UserSettings, GeneralAttrs, ManualShadingAttrs, ShadingConfig, FijiAttrs, NormalizationAttrs, StitchingAttrs, StitchingParams, Mosaic, TileStack, SupportPoint, SupportPoints, Any and Dict from wildcard import of precon3d.custom_types (unused-wildcard-import) ************* Module precon3d.downscaler src/precon3d/downscaler.py:205:0: C0301: Line too long (136/100) (line-too-long) src/precon3d/downscaler.py:286:0: C0301: Line too long (107/100) (line-too-long) src/precon3d/downscaler.py:290:0: C0301: Line too long (103/100) (line-too-long) src/precon3d/downscaler.py:4:0: E0401: Unable to import 'numpy' (import-error) src/precon3d/downscaler.py:7:0: E0401: Unable to import 'rich.progress' (import-error) src/precon3d/downscaler.py:12:0: E0401: Unable to import 'PIL' (import-error) src/precon3d/downscaler.py:15:0: E0401: Unable to import 'typer' (import-error) src/precon3d/downscaler.py:15:0: C0413: Import "import typer" should be placed at the top of the module (wrong-import-position) src/precon3d/downscaler.py:16:0: C0413: Import "import time" should be placed at the top of the module (wrong-import-position) src/precon3d/downscaler.py:17:0: C0413: Import "from typing import NamedTuple, Dict, Any" should be placed at the top of the module (wrong-import-position) src/precon3d/downscaler.py:20:0: C0413: Import "import precon3d.utility as ut" should be placed at the top of the module (wrong-import-position) src/precon3d/downscaler.py:21:0: C0413: Import "import precon3d.factory" should be placed at the top of the module (wrong-import-position) src/precon3d/downscaler.py:24:0: C0413: Import "from precon3d.custom_types import *" should be placed at the top of the module (wrong-import-position) src/precon3d/downscaler.py:25:0: C0413: Import "from precon3d._my_typer_cli import CustomCLIGroup, CustomCLICommand" should be placed at the top of the module (wrong-import-position) src/precon3d/downscaler.py:5:0: C0411: standard import "pathlib.Path" should be placed before third party import "numpy" (wrong-import-order) src/precon3d/downscaler.py:6:0: C0411: standard import "math" should be placed before third party import "numpy" (wrong-import-order) src/precon3d/downscaler.py:16:0: C0411: standard import "time" should be placed before third party imports "numpy", "rich.progress.Progress", "PIL.Image", "typer" (wrong-import-order) src/precon3d/downscaler.py:17:0: C0411: standard import "typing.NamedTuple" should be placed before third party imports "numpy", "rich.progress.Progress", "PIL.Image", "typer" (wrong-import-order) src/precon3d/downscaler.py:4:0: W0611: Unused numpy imported as np (unused-import) src/precon3d/downscaler.py:24:0: W0614: Unused import(s) pytz, npt, ValueExpectedTrueError, UserSettings, GeneralAttrs, ManualShadingAttrs, ShadingConfig, FijiAttrs, NormalizationAttrs, StitchingAttrs, StitchingParams, TilePosition, Mosaic, TileStack, SupportPoint, SupportPoints, SceneSupportPoints, BoundingBox, ChannelMetadata, SceneMetadata, CZIMetadata, datetime and Union from wildcard import of precon3d.custom_types (unused-wildcard-import) ************* Module precon3d.shading_correction src/precon3d/shading_correction.py:149:0: C0301: Line too long (121/100) (line-too-long) src/precon3d/shading_correction.py:164:0: C0301: Line too long (111/100) (line-too-long) src/precon3d/shading_correction.py:220:0: C0301: Line too long (107/100) (line-too-long) src/precon3d/shading_correction.py:300:0: C0301: Line too long (107/100) (line-too-long) src/precon3d/shading_correction.py:368:0: C0301: Line too long (107/100) (line-too-long) src/precon3d/shading_correction.py:407:0: C0301: Line too long (104/100) (line-too-long) src/precon3d/shading_correction.py:466:0: C0301: Line too long (107/100) (line-too-long) src/precon3d/shading_correction.py:565:0: C0301: Line too long (110/100) (line-too-long) src/precon3d/shading_correction.py:566:0: C0301: Line too long (101/100) (line-too-long) src/precon3d/shading_correction.py:571:0: C0301: Line too long (128/100) (line-too-long) src/precon3d/shading_correction.py:576:0: C0301: Line too long (111/100) (line-too-long) src/precon3d/shading_correction.py:581:0: C0301: Line too long (123/100) (line-too-long) src/precon3d/shading_correction.py:582:0: C0301: Line too long (112/100) (line-too-long) src/precon3d/shading_correction.py:583:0: C0301: Line too long (125/100) (line-too-long) src/precon3d/shading_correction.py:592:0: C0301: Line too long (102/100) (line-too-long) src/precon3d/shading_correction.py:596:0: C0301: Line too long (118/100) (line-too-long) src/precon3d/shading_correction.py:603:0: C0301: Line too long (105/100) (line-too-long) src/precon3d/shading_correction.py:611:0: C0301: Line too long (148/100) (line-too-long) src/precon3d/shading_correction.py:625:0: C0301: Line too long (102/100) (line-too-long) src/precon3d/shading_correction.py:627:0: C0301: Line too long (102/100) (line-too-long) src/precon3d/shading_correction.py:628:0: C0301: Line too long (106/100) (line-too-long) src/precon3d/shading_correction.py:629:0: C0301: Line too long (107/100) (line-too-long) src/precon3d/shading_correction.py:635:0: C0301: Line too long (120/100) (line-too-long) src/precon3d/shading_correction.py:640:0: C0301: Line too long (109/100) (line-too-long) src/precon3d/shading_correction.py:647:0: C0301: Line too long (108/100) (line-too-long) src/precon3d/shading_correction.py:648:0: C0301: Line too long (106/100) (line-too-long) src/precon3d/shading_correction.py:662:0: C0301: Line too long (132/100) (line-too-long) src/precon3d/shading_correction.py:699:0: C0301: Line too long (143/100) (line-too-long) src/precon3d/shading_correction.py:850:0: C0301: Line too long (350/100) (line-too-long) src/precon3d/shading_correction.py:855:0: C0301: Line too long (155/100) (line-too-long) src/precon3d/shading_correction.py:862:0: C0301: Line too long (107/100) (line-too-long) src/precon3d/shading_correction.py:975:0: C0301: Line too long (109/100) (line-too-long) src/precon3d/shading_correction.py:986:0: C0301: Line too long (102/100) (line-too-long) src/precon3d/shading_correction.py:1:0: C0302: Too many lines in module (1024/1000) (too-many-lines) src/precon3d/shading_correction.py:1:0: C0114: Missing module docstring (missing-module-docstring) src/precon3d/shading_correction.py:5:0: E0401: Unable to import 'skimage' (import-error) src/precon3d/shading_correction.py:6:0: E0401: Unable to import 'skimage.io' (import-error) src/precon3d/shading_correction.py:7:0: E0401: Unable to import 'imageio' (import-error) src/precon3d/shading_correction.py:9:0: E0401: Unable to import 'numpy' (import-error) src/precon3d/shading_correction.py:13:0: E0401: Unable to import 'joblib' (import-error) src/precon3d/shading_correction.py:16:0: E0401: Unable to import 'numpy.typing' (import-error) src/precon3d/shading_correction.py:18:0: E0401: Unable to import 'scipy.stats' (import-error) src/precon3d/shading_correction.py:19:0: E0401: Unable to import 'sklearn.decomposition' (import-error) src/precon3d/shading_correction.py:22:0: E0401: Unable to import 'typer' (import-error) src/precon3d/shading_correction.py:28:0: E0401: Unable to import 'tqdm' (import-error) src/precon3d/shading_correction.py:105:0: R0914: Too many local variables (26/15) (too-many-locals) src/precon3d/shading_correction.py:357:75: E0602: Undefined variable 'each_image' (undefined-variable) src/precon3d/shading_correction.py:380:0: R0914: Too many local variables (17/15) (too-many-locals) src/precon3d/shading_correction.py:683:4: C0103: Variable name "W" doesn't conform to snake_case naming style (invalid-name) src/precon3d/shading_correction.py:688:4: C0103: Variable name "H" doesn't conform to snake_case naming style (invalid-name) src/precon3d/shading_correction.py:683:4: W0612: Unused variable 'W' (unused-variable) src/precon3d/shading_correction.py:710:0: E0401: Unable to import 'imageio.v3' (import-error) src/precon3d/shading_correction.py:710:0: C0413: Import "import imageio.v3 as iio" should be placed at the top of the module (wrong-import-position) src/precon3d/shading_correction.py:711:0: C0413: Import "import tempfile" should be placed at the top of the module (wrong-import-position) src/precon3d/shading_correction.py:714:0: R0914: Too many local variables (20/15) (too-many-locals) src/precon3d/shading_correction.py:764:4: C0103: Variable name "X" doesn't conform to snake_case naming style (invalid-name) src/precon3d/shading_correction.py:788:4: C0103: Variable name "W" doesn't conform to snake_case naming style (invalid-name) src/precon3d/shading_correction.py:789:4: C0103: Variable name "H" doesn't conform to snake_case naming style (invalid-name) src/precon3d/shading_correction.py:757:10: R1732: Consider using 'with' for resource-allocating operations (consider-using-with) src/precon3d/shading_correction.py:788:4: W0612: Unused variable 'W' (unused-variable) src/precon3d/shading_correction.py:868:16: R1732: Consider using 'with' for resource-allocating operations (consider-using-with) src/precon3d/shading_correction.py:876:12: W0612: Unused variable 'stderr' (unused-variable) src/precon3d/shading_correction.py:959:0: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements) src/precon3d/shading_correction.py:8:0: C0411: standard import "pathlib.Path" should be placed before third party imports "skimage", "skimage.io", "imageio" (wrong-import-order) src/precon3d/shading_correction.py:10:0: C0411: standard import "time" should be placed before third party imports "skimage", "skimage.io", "imageio", "numpy" (wrong-import-order) src/precon3d/shading_correction.py:11:0: C0411: standard import "random" should be placed before third party imports "skimage", "skimage.io", "imageio", "numpy" (wrong-import-order) src/precon3d/shading_correction.py:12:0: C0411: standard import "dataclasses.dataclass" should be placed before third party imports "skimage", "skimage.io", "imageio", "numpy" (wrong-import-order) src/precon3d/shading_correction.py:17:0: C0411: standard import "typing.List" should be placed before third party imports "skimage", "skimage.io", "imageio", "numpy", "joblib.Parallel", "numpy.typing.NDArray" (wrong-import-order) src/precon3d/shading_correction.py:20:0: C0411: standard import "subprocess.Popen" should be placed before third party imports "skimage", "skimage.io", "imageio" (...) "numpy.typing.NDArray", "scipy.stats.wasserstein_distance", "sklearn.decomposition.NMF" (wrong-import-order) src/precon3d/shading_correction.py:21:0: C0411: standard import "subprocess" should be placed before third party imports "skimage", "skimage.io", "imageio" (...) "numpy.typing.NDArray", "scipy.stats.wasserstein_distance", "sklearn.decomposition.NMF" (wrong-import-order) src/precon3d/shading_correction.py:710:0: C0411: third party import "imageio.v3" should be placed before first party imports "precon3d.utility", "precon3d.mosaic_utils", "precon3d.factory", "precon3d.custom_types.*", "precon3d._my_typer_cli.CustomCLIGroup" (wrong-import-order) src/precon3d/shading_correction.py:711:0: C0411: standard import "tempfile" should be placed before third party imports "skimage", "skimage.io", "imageio" (...) "typer", "tqdm.tqdm", "imageio.v3" and first party imports "precon3d.utility", "precon3d.mosaic_utils", "precon3d.factory", "precon3d.custom_types.*", "precon3d._my_typer_cli.CustomCLIGroup" (wrong-import-order) src/precon3d/shading_correction.py:710:0: C0412: Imports from package imageio are not grouped (ungrouped-imports) src/precon3d/shading_correction.py:10:0: W0611: Unused import time (unused-import) src/precon3d/shading_correction.py:12:0: W0611: Unused dataclass imported from dataclasses (unused-import) src/precon3d/shading_correction.py:12:0: W0611: Unused field imported from dataclasses (unused-import) src/precon3d/shading_correction.py:17:0: W0611: Unused Dict imported from typing (unused-import) src/precon3d/shading_correction.py:17:0: W0611: Unused Any imported from typing (unused-import) src/precon3d/shading_correction.py:17:0: W0611: Unused NamedTuple imported from typing (unused-import) src/precon3d/shading_correction.py:18:0: W0611: Unused wasserstein_distance imported from scipy.stats (unused-import) src/precon3d/shading_correction.py:18:0: W0611: Unused chisquare imported from scipy.stats (unused-import) src/precon3d/shading_correction.py:20:0: W0611: Unused DEVNULL imported from subprocess (unused-import) src/precon3d/shading_correction.py:21:0: W0611: Unused import subprocess (unused-import) src/precon3d/shading_correction.py:32:0: W0611: Unused import precon3d.mosaic_utils (unused-import) src/precon3d/shading_correction.py:33:0: W0611: Unused precon3d.factory imported as gen_types (unused-import) src/precon3d/shading_correction.py:36:0: W0614: Unused import(s) pytz, npt, ValueExpectedTrueError, UserSettings, GeneralAttrs, ManualShadingAttrs, ShadingConfig, FijiAttrs, NormalizationAttrs, StitchingAttrs, StitchingParams, TilePosition, Mosaic, TileStack, SupportPoint, SupportPoints, SceneSupportPoints, BoundingBox, ChannelMetadata, SceneMetadata, CZIMetadata, datetime and Union from wildcard import of precon3d.custom_types (unused-wildcard-import) ************* Module precon3d.utility src/precon3d/utility.py:1:0: C0301: Line too long (110/100) (line-too-long) src/precon3d/utility.py:102:0: C0301: Line too long (130/100) (line-too-long) src/precon3d/utility.py:108:0: C0301: Line too long (112/100) (line-too-long) src/precon3d/utility.py:237:0: C0301: Line too long (107/100) (line-too-long) src/precon3d/utility.py:246:0: C0301: Line too long (106/100) (line-too-long) src/precon3d/utility.py:254:0: C0301: Line too long (263/100) (line-too-long) src/precon3d/utility.py:284:0: C0301: Line too long (118/100) (line-too-long) src/precon3d/utility.py:536:0: C0301: Line too long (117/100) (line-too-long) src/precon3d/utility.py:540:0: C0301: Line too long (104/100) (line-too-long) src/precon3d/utility.py:575:0: C0301: Line too long (115/100) (line-too-long) src/precon3d/utility.py:649:0: C0301: Line too long (101/100) (line-too-long) src/precon3d/utility.py:692:0: C0301: Line too long (108/100) (line-too-long) src/precon3d/utility.py:853:0: C0301: Line too long (102/100) (line-too-long) src/precon3d/utility.py:9:0: E0401: Unable to import 'pytest' (import-error) src/precon3d/utility.py:10:0: E0401: Unable to import 'typer' (import-error) src/precon3d/utility.py:11:0: E0401: Unable to import 'PIL' (import-error) src/precon3d/utility.py:14:0: C0413: Import "from concurrent.futures import ThreadPoolExecutor" should be placed at the top of the module (wrong-import-position) src/precon3d/utility.py:17:0: E0401: Unable to import 'skimage' (import-error) src/precon3d/utility.py:17:0: C0413: Import "import skimage" should be placed at the top of the module (wrong-import-position) src/precon3d/utility.py:18:0: E0401: Unable to import 'numpy' (import-error) src/precon3d/utility.py:18:0: C0413: Import "import numpy as np" should be placed at the top of the module (wrong-import-position) src/precon3d/utility.py:19:0: C0413: Import "import datetime" should be placed at the top of the module (wrong-import-position) src/precon3d/utility.py:20:0: E0401: Unable to import 'yaml' (import-error) src/precon3d/utility.py:20:0: C0413: Import "import yaml" should be placed at the top of the module (wrong-import-position) src/precon3d/utility.py:21:0: C0413: Import "from enum import Enum, IntEnum" should be placed at the top of the module (wrong-import-position) src/precon3d/utility.py:22:0: C0413: Import "from typing import NamedTuple, Final, Dict, Any, List" should be placed at the top of the module (wrong-import-position) src/precon3d/utility.py:25:0: C0413: Import "from precon3d.custom_types import *" should be placed at the top of the module (wrong-import-position) src/precon3d/utility.py:26:0: C0413: Import "from precon3d._my_typer_cli import CustomCLIGroup, CustomCLICommand" should be placed at the top of the module (wrong-import-position) src/precon3d/utility.py:54:18: W0212: Access to a protected member _value2member_map_ of a client class (protected-access) src/precon3d/utility.py:116:9: R1714: Consider merging these comparisons with 'in' by using 'image_array.dtype in (np.float32, np.float64)'. Use a set instead if elements are hashable. (consider-using-in) src/precon3d/utility.py:272:16: R1704: Redefining argument with the local name 'path' (redefined-argument-from-local) src/precon3d/utility.py:273:42: E0602: Undefined variable 'Pat' (undefined-variable) src/precon3d/utility.py:465:4: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return) src/precon3d/utility.py:485:4: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return) src/precon3d/utility.py:529:15: W0718: Catching too general exception Exception (broad-exception-caught) src/precon3d/utility.py:563:19: W0718: Catching too general exception Exception (broad-exception-caught) src/precon3d/utility.py:757:19: W0718: Catching too general exception Exception (broad-exception-caught) src/precon3d/utility.py:832:0: R0914: Too many local variables (18/15) (too-many-locals) src/precon3d/utility.py:14:0: C0411: standard import "concurrent.futures.ThreadPoolExecutor" should be placed before third party imports "pytest", "typer", "PIL.Image" (wrong-import-order) src/precon3d/utility.py:19:0: C0411: standard import "datetime" should be placed before third party imports "pytest", "typer", "PIL.Image", "skimage", "numpy" (wrong-import-order) src/precon3d/utility.py:21:0: C0411: standard import "enum.Enum" should be placed before third party imports "pytest", "typer", "PIL.Image", "skimage", "numpy", "yaml" (wrong-import-order) src/precon3d/utility.py:22:0: C0411: standard import "typing.NamedTuple" should be placed before third party imports "pytest", "typer", "PIL.Image", "skimage", "numpy", "yaml" (wrong-import-order) src/precon3d/utility.py:22:0: W0611: Unused NamedTuple imported from typing (unused-import) src/precon3d/utility.py:22:0: W0611: Unused Dict imported from typing (unused-import) src/precon3d/utility.py:25:0: W0614: Unused import(s) pytz, npt, ValueExpectedTrueError, GeneralAttrs, ManualShadingAttrs, ShadingConfig, FijiAttrs, NormalizationAttrs, StitchingAttrs, StitchingParams, TilePosition, Mosaic, TileStack, SupportPoint, SupportPoints, SceneSupportPoints, BoundingBox, ChannelMetadata, SceneMetadata, CZIMetadata and Union from wildcard import of precon3d.custom_types (unused-wildcard-import) ************* Module precon3d.post_stitch_utils src/precon3d/post_stitch_utils.py:235:0: C0301: Line too long (102/100) (line-too-long) src/precon3d/post_stitch_utils.py:279:0: C0301: Line too long (103/100) (line-too-long) src/precon3d/post_stitch_utils.py:406:0: C0301: Line too long (118/100) (line-too-long) src/precon3d/post_stitch_utils.py:490:0: C0301: Line too long (148/100) (line-too-long) src/precon3d/post_stitch_utils.py:491:0: C0301: Line too long (124/100) (line-too-long) src/precon3d/post_stitch_utils.py:570:0: C0301: Line too long (128/100) (line-too-long) src/precon3d/post_stitch_utils.py:662:0: C0301: Line too long (114/100) (line-too-long) src/precon3d/post_stitch_utils.py:770:0: C0301: Line too long (120/100) (line-too-long) src/precon3d/post_stitch_utils.py:870:0: C0301: Line too long (116/100) (line-too-long) src/precon3d/post_stitch_utils.py:1:0: C0114: Missing module docstring (missing-module-docstring) src/precon3d/post_stitch_utils.py:1:0: E0401: Unable to import 'numpy.typing' (import-error) src/precon3d/post_stitch_utils.py:4:0: E0401: Unable to import 'skimage' (import-error) src/precon3d/post_stitch_utils.py:5:0: E0401: Unable to import 'numpy' (import-error) src/precon3d/post_stitch_utils.py:7:0: E0401: Unable to import 'typer' (import-error) src/precon3d/post_stitch_utils.py:8:0: E0401: Unable to import 'imageio' (import-error) src/precon3d/post_stitch_utils.py:9:0: E0401: Unable to import 'scipy' (import-error) src/precon3d/post_stitch_utils.py:10:0: E0401: Unable to import 'PIL' (import-error) src/precon3d/post_stitch_utils.py:13:0: E0401: Unable to import 'tifffile' (import-error) src/precon3d/post_stitch_utils.py:13:0: C0413: Import "import tifffile" should be placed at the top of the module (wrong-import-position) src/precon3d/post_stitch_utils.py:14:0: C0413: Import "import re" should be placed at the top of the module (wrong-import-position) src/precon3d/post_stitch_utils.py:15:0: C0413: Import "from itertools import islice" should be placed at the top of the module (wrong-import-position) src/precon3d/post_stitch_utils.py:16:0: C0413: Import "from itertools import pairwise" should be placed at the top of the module (wrong-import-position) src/precon3d/post_stitch_utils.py:18:0: E0401: Unable to import 'joblib' (import-error) src/precon3d/post_stitch_utils.py:18:0: C0413: Import "from joblib import Parallel, delayed" should be placed at the top of the module (wrong-import-position) src/precon3d/post_stitch_utils.py:19:0: C0413: Import "from concurrent.futures import ThreadPoolExecutor" should be placed at the top of the module (wrong-import-position) src/precon3d/post_stitch_utils.py:21:0: C0413: Import "import precon3d.utility as ut" should be placed at the top of the module (wrong-import-position) src/precon3d/post_stitch_utils.py:24:0: C0413: Import "from precon3d._my_typer_cli import CustomCLIGroup, CustomCLICommand" should be placed at the top of the module (wrong-import-position) src/precon3d/post_stitch_utils.py:67:0: C0116: Missing function or method docstring (missing-function-docstring) src/precon3d/post_stitch_utils.py:193:0: R0914: Too many local variables (18/15) (too-many-locals) src/precon3d/post_stitch_utils.py:283:0: R0914: Too many local variables (17/15) (too-many-locals) src/precon3d/post_stitch_utils.py:426:0: C0116: Missing function or method docstring (missing-function-docstring) src/precon3d/post_stitch_utils.py:574:0: E0401: Unable to import 'matplotlib.pyplot' (import-error) src/precon3d/post_stitch_utils.py:574:0: C0413: Import "import matplotlib.pyplot as plt" should be placed at the top of the module (wrong-import-position) src/precon3d/post_stitch_utils.py:577:0: R0914: Too many local variables (18/15) (too-many-locals) src/precon3d/post_stitch_utils.py:580:4: C0103: Variable name "H" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:580:7: C0103: Variable name "W" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:583:4: C0103: Variable name "C_norm" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:612:4: W0612: Unused variable 'fig' (unused-variable) src/precon3d/post_stitch_utils.py:651:0: C0413: Import "import os" should be placed at the top of the module (wrong-import-position) src/precon3d/post_stitch_utils.py:652:0: E0401: Unable to import 'skimage' (import-error) src/precon3d/post_stitch_utils.py:652:0: C0413: Import "from skimage import io" should be placed at the top of the module (wrong-import-position) src/precon3d/post_stitch_utils.py:653:0: E0401: Unable to import 'skimage.util' (import-error) src/precon3d/post_stitch_utils.py:653:0: C0413: Import "from skimage.util import img_as_float" should be placed at the top of the module (wrong-import-position) src/precon3d/post_stitch_utils.py:690:0: E0401: Unable to import 'sklearn.decomposition' (import-error) src/precon3d/post_stitch_utils.py:690:0: C0413: Import "from sklearn.decomposition import PCA, NMF" should be placed at the top of the module (wrong-import-position) src/precon3d/post_stitch_utils.py:693:12: C0103: Argument name "Phi" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:705:4: C0103: Variable name "R" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:708:8: C0103: Variable name "Lambda" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:716:8: C0103: Variable name "R" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:707:8: W0612: Unused variable 'i' (unused-variable) src/precon3d/post_stitch_utils.py:729:0: R0914: Too many local variables (19/15) (too-many-locals) src/precon3d/post_stitch_utils.py:738:4: C0103: Variable name "H" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:738:7: C0103: Variable name "W" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:738:10: C0103: Variable name "C" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:740:4: C0103: Variable name "X" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:750:18: C0103: Variable name "R" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:738:10: W0612: Unused variable 'C' (unused-variable) src/precon3d/post_stitch_utils.py:746:4: W0612: Unused variable 'scores' (unused-variable) src/precon3d/post_stitch_utils.py:750:18: W0612: Unused variable 'R' (unused-variable) src/precon3d/post_stitch_utils.py:777:12: C0103: Argument name "X" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:777:15: C0103: Argument name "C_init" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:777:23: C0103: Argument name "S_init" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:784:4: C0103: Variable name "C" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:785:4: C0103: Variable name "S" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:787:8: C0103: Variable name "S_old" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:790:8: C0103: Variable name "S" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:794:8: C0103: Variable name "C" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:806:0: C0116: Missing function or method docstring (missing-function-docstring) src/precon3d/post_stitch_utils.py:806:18: C0103: Argument name "X" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:806:21: C0103: Argument name "C_init" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:806:29: C0103: Argument name "S_init" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:807:4: C0103: Variable name "C" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:808:4: C0103: Variable name "S" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:810:8: C0103: Variable name "S_old" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:813:8: C0103: Variable name "S" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:817:8: C0103: Variable name "C" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:842:4: C0103: Variable name "H" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:842:7: C0103: Variable name "W" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:842:10: C0103: Variable name "C" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:844:4: C0103: Variable name "X" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:856:4: C0103: Variable name "C_init" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:857:4: C0103: Variable name "S_init" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:860:4: C0103: Variable name "S_init" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:862:4: C0103: Variable name "C_mcr" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:862:11: C0103: Variable name "S_mcr" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:865:4: C0103: Variable name "C_imgs" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:842:10: W0612: Unused variable 'C' (unused-variable) src/precon3d/post_stitch_utils.py:877:0: R0914: Too many local variables (17/15) (too-many-locals) src/precon3d/post_stitch_utils.py:886:4: C0103: Variable name "H" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:886:7: C0103: Variable name "W" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:886:10: C0103: Variable name "C" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:888:4: C0103: Variable name "X" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:903:4: C0103: Variable name "C_init" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:906:4: C0103: Variable name "S_init" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:909:4: C0103: Variable name "S_init" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:911:4: C0103: Variable name "C_mcr" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:911:11: C0103: Variable name "S_mcr" doesn't conform to snake_case naming style (invalid-name) src/precon3d/post_stitch_utils.py:877:33: W0613: Unused argument 'loadings' (unused-argument) src/precon3d/post_stitch_utils.py:886:10: W0612: Unused variable 'C' (unused-variable) src/precon3d/post_stitch_utils.py:911:4: W0612: Unused variable 'C_mcr' (unused-variable) src/precon3d/post_stitch_utils.py:914:4: W0612: Unused variable 'score_imgs' (unused-variable) src/precon3d/post_stitch_utils.py:2:0: C0411: standard import "typing.NamedTuple" should be placed before third party import "numpy.typing" (wrong-import-order) src/precon3d/post_stitch_utils.py:3:0: C0411: standard import "pathlib.Path" should be placed before third party import "numpy.typing" (wrong-import-order) src/precon3d/post_stitch_utils.py:6:0: C0411: standard import "time" should be placed before third party imports "numpy.typing", "skimage", "numpy" (wrong-import-order) src/precon3d/post_stitch_utils.py:14:0: C0411: standard import "re" should be placed before third party imports "numpy.typing", "skimage", "numpy" (...) "scipy", "PIL.Image", "tifffile" (wrong-import-order) src/precon3d/post_stitch_utils.py:15:0: C0411: standard import "itertools.islice" should be placed before third party imports "numpy.typing", "skimage", "numpy" (...) "scipy", "PIL.Image", "tifffile" (wrong-import-order) src/precon3d/post_stitch_utils.py:16:0: C0411: standard import "itertools.pairwise" should be placed before third party imports "numpy.typing", "skimage", "numpy" (...) "scipy", "PIL.Image", "tifffile" (wrong-import-order) src/precon3d/post_stitch_utils.py:19:0: C0411: standard import "concurrent.futures.ThreadPoolExecutor" should be placed before third party imports "numpy.typing", "skimage", "numpy" (...) "PIL.Image", "tifffile", "joblib.Parallel" (wrong-import-order) src/precon3d/post_stitch_utils.py:574:0: C0411: third party import "matplotlib.pyplot" should be placed before first party imports "precon3d.utility", "precon3d._my_typer_cli.CustomCLIGroup" (wrong-import-order) src/precon3d/post_stitch_utils.py:651:0: C0411: standard import "os" should be placed before third party imports "numpy.typing", "skimage", "numpy" (...) "tifffile", "joblib.Parallel", "matplotlib.pyplot" and first party imports "precon3d.utility", "precon3d._my_typer_cli.CustomCLIGroup" (wrong-import-order) src/precon3d/post_stitch_utils.py:652:0: C0411: third party import "skimage.io" should be placed before first party imports "precon3d.utility", "precon3d._my_typer_cli.CustomCLIGroup" (wrong-import-order) src/precon3d/post_stitch_utils.py:653:0: C0411: third party import "skimage.util.img_as_float" should be placed before first party imports "precon3d.utility", "precon3d._my_typer_cli.CustomCLIGroup" (wrong-import-order) src/precon3d/post_stitch_utils.py:690:0: C0411: third party import "sklearn.decomposition.PCA" should be placed before first party imports "precon3d.utility", "precon3d._my_typer_cli.CustomCLIGroup" (wrong-import-order) src/precon3d/post_stitch_utils.py:5:0: C0412: Imports from package numpy are not grouped (ungrouped-imports) src/precon3d/post_stitch_utils.py:2:0: W0611: Unused NamedTuple imported from typing (unused-import) src/precon3d/post_stitch_utils.py:6:0: W0611: Unused import time (unused-import) src/precon3d/post_stitch_utils.py:15:0: W0611: Unused islice imported from itertools (unused-import) src/precon3d/post_stitch_utils.py:16:0: W0611: Unused pairwise imported from itertools (unused-import) src/precon3d/post_stitch_utils.py:651:0: W0611: Unused import os (unused-import) src/precon3d/post_stitch_utils.py:652:0: W0611: Unused io imported from skimage (unused-import) ************* Module precon3d.aligner src/precon3d/aligner.py:383:0: C0301: Line too long (101/100) (line-too-long) src/precon3d/aligner.py:403:0: C0301: Line too long (123/100) (line-too-long) src/precon3d/aligner.py:463:0: C0301: Line too long (124/100) (line-too-long) src/precon3d/aligner.py:734:0: C0301: Line too long (102/100) (line-too-long) src/precon3d/aligner.py:735:0: C0301: Line too long (128/100) (line-too-long) src/precon3d/aligner.py:844:0: C0301: Line too long (109/100) (line-too-long) src/precon3d/aligner.py:847:0: C0301: Line too long (110/100) (line-too-long) src/precon3d/aligner.py:851:0: C0301: Line too long (123/100) (line-too-long) src/precon3d/aligner.py:934:0: C0301: Line too long (121/100) (line-too-long) src/precon3d/aligner.py:994:0: C0301: Line too long (105/100) (line-too-long) src/precon3d/aligner.py:998:0: C0301: Line too long (105/100) (line-too-long) src/precon3d/aligner.py:1061:0: C0301: Line too long (123/100) (line-too-long) src/precon3d/aligner.py:1104:0: C0301: Line too long (123/100) (line-too-long) src/precon3d/aligner.py:1107:0: C0301: Line too long (108/100) (line-too-long) src/precon3d/aligner.py:1111:0: C0301: Line too long (102/100) (line-too-long) src/precon3d/aligner.py:1123:0: C0301: Line too long (108/100) (line-too-long) src/precon3d/aligner.py:1291:0: C0301: Line too long (149/100) (line-too-long) src/precon3d/aligner.py:1:0: C0302: Too many lines in module (1338/1000) (too-many-lines) src/precon3d/aligner.py:1:0: C0114: Missing module docstring (missing-module-docstring) src/precon3d/aligner.py:12:0: E0401: Unable to import 'numpy' (import-error) src/precon3d/aligner.py:13:0: E0401: Unable to import 'PIL' (import-error) src/precon3d/aligner.py:14:0: E0401: Unable to import 'scipy.ndimage' (import-error) src/precon3d/aligner.py:15:0: E0401: Unable to import 'scipy.optimize' (import-error) src/precon3d/aligner.py:16:0: W0404: Reimport 'scipy.optimize' (imported line 15) (reimported) src/precon3d/aligner.py:16:0: E0401: Unable to import 'scipy.optimize' (import-error) src/precon3d/aligner.py:19:0: E0401: Unable to import 'imageio' (import-error) src/precon3d/aligner.py:19:0: C0413: Import "import imageio" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:20:0: E0401: Unable to import 'skimage' (import-error) src/precon3d/aligner.py:20:0: C0413: Import "from skimage import feature, transform, registration, measure, exposure" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:21:0: E0401: Unable to import 'matplotlib.pyplot' (import-error) src/precon3d/aligner.py:21:0: C0413: Import "import matplotlib.pyplot as plt" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:22:0: E0401: Unable to import 'typer' (import-error) src/precon3d/aligner.py:22:0: C0413: Import "import typer" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:23:0: E0401: Unable to import 'rich.progress' (import-error) src/precon3d/aligner.py:23:0: C0413: Import "from rich.progress import Progress, SpinnerColumn, BarColumn, TextColumn" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:30:0: E0401: Unable to import 'pystackreg' (import-error) src/precon3d/aligner.py:30:0: C0413: Import "from pystackreg import StackReg" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:32:0: E0401: Unable to import 'skimage.transform' (import-error) src/precon3d/aligner.py:32:0: C0413: Import "from skimage.transform import pyramid_gaussian" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:36:0: C0413: Import "from precon3d.stitcher import FijiAttrs" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:37:0: C0413: Import "import precon3d.utility as ut" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:38:0: C0413: Import "import precon3d.factory as gen_types" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:41:0: C0413: Import "from precon3d.custom_types import *" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:42:0: C0413: Import "from precon3d._my_typer_cli import CustomCLIGroup, CustomCLICommand" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:116:0: C0116: Missing function or method docstring (missing-function-docstring) src/precon3d/aligner.py:189:0: E0401: Unable to import 'scipy.optimize' (import-error) src/precon3d/aligner.py:189:0: C0413: Import "from scipy.optimize import minimize" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:190:0: E0401: Unable to import 'scipy' (import-error) src/precon3d/aligner.py:190:0: C0413: Import "import scipy" should be placed at the top of the module (wrong-import-position) src/precon3d/aligner.py:309:40: W0640: Cell variable mov defined in loop (cell-var-from-loop) src/precon3d/aligner.py:318:30: W0640: Cell variable ref defined in loop (cell-var-from-loop) src/precon3d/aligner.py:634:0: R0914: Too many local variables (27/15) (too-many-locals) src/precon3d/aligner.py:750:8: W0612: Unused variable 'fig' (unused-variable) src/precon3d/aligner.py:854:0: R0914: Too many local variables (22/15) (too-many-locals) src/precon3d/aligner.py:854:0: R0915: Too many statements (54/50) (too-many-statements) src/precon3d/aligner.py:1026:20: R1732: Consider using 'with' for resource-allocating operations (consider-using-with) src/precon3d/aligner.py:1105:4: R1720: Unnecessary "else" after "raise", remove the "else" and de-indent the code inside it (no-else-raise) src/precon3d/aligner.py:1143:0: C0116: Missing function or method docstring (missing-function-docstring) src/precon3d/aligner.py:1150:0: C0116: Missing function or method docstring (missing-function-docstring) src/precon3d/aligner.py:189:0: C0411: third party import "scipy.optimize.minimize" should be placed before first party imports "precon3d.stitcher.FijiAttrs", "precon3d.utility", "precon3d.factory", "precon3d.custom_types.*", "precon3d._my_typer_cli.CustomCLIGroup" (wrong-import-order) src/precon3d/aligner.py:190:0: C0411: third party import "scipy" should be placed before first party imports "precon3d.stitcher.FijiAttrs", "precon3d.utility", "precon3d.factory", "precon3d.custom_types.*", "precon3d._my_typer_cli.CustomCLIGroup" (wrong-import-order) src/precon3d/aligner.py:32:0: C0412: Imports from package skimage are not grouped (ungrouped-imports) src/precon3d/aligner.py:19:0: W0611: Unused import imageio (unused-import) src/precon3d/aligner.py:20:0: W0611: Unused exposure imported from skimage (unused-import) src/precon3d/aligner.py:23:0: W0611: Unused BarColumn imported from rich.progress (unused-import) src/precon3d/aligner.py:41:0: W0614: Unused import(s) pytz, npt, ValueExpectedTrueError, UserSettings, GeneralAttrs, ManualShadingAttrs, ShadingConfig, NormalizationAttrs, StitchingAttrs, StitchingParams, TilePosition, Mosaic, TileStack, SupportPoint, SupportPoints, SceneSupportPoints, BoundingBox, ChannelMetadata, SceneMetadata, CZIMetadata, datetime and Union from wildcard import of precon3d.custom_types (unused-wildcard-import) ************* Module precon3d.stitcher src/precon3d/stitcher.py:20:0: E0401: Unable to import 'typer' (import-error) src/precon3d/stitcher.py:21:0: E0401: Unable to import 'numpy' (import-error) src/precon3d/stitcher.py:22:0: E0401: Unable to import 'skimage.io' (import-error) src/precon3d/stitcher.py:23:0: E0401: Unable to import 'imageio' (import-error) src/precon3d/stitcher.py:24:0: E0401: Unable to import 'PIL' (import-error) src/precon3d/stitcher.py:25:0: E0401: Unable to import 'rich.progress' (import-error) src/precon3d/stitcher.py:26:0: E0401: Unable to import 'joblib' (import-error) src/precon3d/stitcher.py:27:0: E0401: Unable to import 'aicspylibczi' (import-error) src/precon3d/stitcher.py:30:0: R0402: Use 'from precon3d import mosaic_utils' instead (consider-using-from-import) src/precon3d/stitcher.py:32:0: R0402: Use 'from precon3d import factory' instead (consider-using-from-import) src/precon3d/stitcher.py:52:0: R0914: Too many local variables (16/15) (too-many-locals) src/precon3d/stitcher.py:74:23: E1123: Unexpected keyword argument 'tileconfig' in function call (unexpected-keyword-arg) src/precon3d/stitcher.py:108:0: R0914: Too many local variables (21/15) (too-many-locals) src/precon3d/stitcher.py:133:21: E1101: Module 'precon3d.mosaic_utils' has no 'ai_mosaic' member (no-member) src/precon3d/stitcher.py:259:12: E1123: Unexpected keyword argument 'tileconfig' in function call (unexpected-keyword-arg) src/precon3d/stitcher.py:332:13: E1101: Module 'precon3d.mosaic_utils' has no 'retrieve_tile_region_array_data' member (no-member) ************* Module precon3d.cropper src/precon3d/cropper.py:1:0: C0114: Missing module docstring (missing-module-docstring) src/precon3d/cropper.py:3:0: E0401: Unable to import 'numpy' (import-error) src/precon3d/cropper.py:5:0: E0401: Unable to import 'PIL' (import-error) src/precon3d/cropper.py:8:0: C0413: Import "from typing import NamedTuple, Dict, Any" should be placed at the top of the module (wrong-import-position) src/precon3d/cropper.py:9:0: E0401: Unable to import 'typer' (import-error) src/precon3d/cropper.py:9:0: C0413: Import "import typer" should be placed at the top of the module (wrong-import-position) src/precon3d/cropper.py:10:0: E0401: Unable to import 'rich.progress' (import-error) src/precon3d/cropper.py:10:0: C0413: Import "from rich.progress import Progress, BarColumn, TextColumn" should be placed at the top of the module (wrong-import-position) src/precon3d/cropper.py:17:0: C0413: Import "import precon3d.utility as ut" should be placed at the top of the module (wrong-import-position) src/precon3d/cropper.py:18:0: C0413: Import "import precon3d.factory" should be placed at the top of the module (wrong-import-position) src/precon3d/cropper.py:21:0: C0413: Import "from precon3d.custom_types import *" should be placed at the top of the module (wrong-import-position) src/precon3d/cropper.py:22:0: C0413: Import "from precon3d._my_typer_cli import CustomCLIGroup, CustomCLICommand" should be placed at the top of the module (wrong-import-position) src/precon3d/cropper.py:4:0: C0411: standard import "pathlib.Path" should be placed before third party import "numpy" (wrong-import-order) src/precon3d/cropper.py:8:0: C0411: standard import "typing.NamedTuple" should be placed before third party imports "numpy", "PIL.Image" (wrong-import-order) src/precon3d/cropper.py:1:0: W0611: Unused import os (unused-import) src/precon3d/cropper.py:3:0: W0611: Unused numpy imported as np (unused-import) src/precon3d/cropper.py:21:0: W0614: Unused import(s) pytz, npt, ValueExpectedTrueError, UserSettings, GeneralAttrs, ManualShadingAttrs, ShadingConfig, FijiAttrs, NormalizationAttrs, StitchingAttrs, StitchingParams, TilePosition, Mosaic, TileStack, SupportPoint, SupportPoints, SceneSupportPoints, BoundingBox, ChannelMetadata, SceneMetadata, CZIMetadata, datetime and Union from wildcard import of precon3d.custom_types (unused-wildcard-import) ************* Module precon3d.factory src/precon3d/factory.py:233:0: C0301: Line too long (119/100) (line-too-long) src/precon3d/factory.py:242:0: C0301: Line too long (104/100) (line-too-long) src/precon3d/factory.py:251:0: C0301: Line too long (124/100) (line-too-long) src/precon3d/factory.py:181:5: W0511: TODO: pchao, what to do if it is created later... (fixme) src/precon3d/factory.py:92:0: R0914: Too many local variables (23/15) (too-many-locals) src/precon3d/factory.py:194:21: E0602: Undefined variable 'os' (undefined-variable) src/precon3d/factory.py:195:15: E0602: Undefined variable 'os' (undefined-variable) src/precon3d/factory.py:195:29: E0602: Undefined variable 'os' (undefined-variable) src/precon3d/factory.py:92:0: R0912: Too many branches (17/12) (too-many-branches) src/precon3d/factory.py:92:0: R0915: Too many statements (57/50) (too-many-statements) src/precon3d/factory.py:8:0: W0614: Unused import(s) pytz, npt, ValueExpectedTrueError, UserSettings, TilePosition, Mosaic, TileStack, SupportPoint, SupportPoints, SceneSupportPoints, BoundingBox, ChannelMetadata, SceneMetadata, CZIMetadata, datetime, NamedTuple and Union from wildcard import of precon3d.custom_types (unused-wildcard-import) ************* Module precon3d._my_typer_cli src/precon3d/_my_typer_cli.py:11:0: E0401: Unable to import 'click' (import-error) src/precon3d/_my_typer_cli.py:12:0: E0401: Unable to import 'typer' (import-error) src/precon3d/_my_typer_cli.py:13:0: E0401: Unable to import 'rich.console' (import-error) src/precon3d/_my_typer_cli.py:14:0: E0401: Unable to import 'rich.table' (import-error) src/precon3d/_my_typer_cli.py:15:0: E0401: Unable to import 'rich' (import-error) src/precon3d/_my_typer_cli.py:246:4: C0116: Missing function or method docstring (missing-function-docstring) src/precon3d/_my_typer_cli.py:246:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements) src/precon3d/_my_typer_cli.py:254:4: C0116: Missing function or method docstring (missing-function-docstring) src/precon3d/_my_typer_cli.py:254:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements) src/precon3d/_my_typer_cli.py:262:4: C0116: Missing function or method docstring (missing-function-docstring) src/precon3d/_my_typer_cli.py:265:4: C0116: Missing function or method docstring (missing-function-docstring) src/precon3d/_my_typer_cli.py:15:0: W0611: Unused box imported from rich (unused-import) ************* Module precon3d.resampler src/precon3d/resampler.py:167:0: C0301: Line too long (124/100) (line-too-long) src/precon3d/resampler.py:282:0: C0301: Line too long (132/100) (line-too-long) src/precon3d/resampler.py:727:0: C0301: Line too long (101/100) (line-too-long) src/precon3d/resampler.py:862:0: C0301: Line too long (122/100) (line-too-long) src/precon3d/resampler.py:867:0: C0301: Line too long (107/100) (line-too-long) src/precon3d/resampler.py:871:0: C0301: Line too long (105/100) (line-too-long) src/precon3d/resampler.py:961:0: C0301: Line too long (108/100) (line-too-long) src/precon3d/resampler.py:966:0: C0301: Line too long (118/100) (line-too-long) src/precon3d/resampler.py:1051:0: C0301: Line too long (107/100) (line-too-long) src/precon3d/resampler.py:1:0: C0302: Too many lines in module (1052/1000) (too-many-lines) src/precon3d/resampler.py:5:0: E0401: Unable to import 'numpy.typing' (import-error) src/precon3d/resampler.py:8:0: E0401: Unable to import 'matplotlib.pyplot' (import-error) src/precon3d/resampler.py:9:0: E0401: Unable to import 'mpl_toolkits.mplot3d' (import-error) src/precon3d/resampler.py:12:0: E0401: Unable to import 'rich.progress' (import-error) src/precon3d/resampler.py:14:0: E0401: Unable to import 'typer' (import-error) src/precon3d/resampler.py:24:0: E0401: Unable to import 'numpy' (import-error) src/precon3d/resampler.py:25:0: E0401: Unable to import 'pandas' (import-error) src/precon3d/resampler.py:26:0: W0404: Reimport 'matplotlib.pyplot' (imported line 8) (reimported) src/precon3d/resampler.py:26:0: E0401: Unable to import 'matplotlib.pyplot' (import-error) src/precon3d/resampler.py:27:0: E0401: Unable to import 'scipy' (import-error) src/precon3d/resampler.py:28:0: E0401: Unable to import 'aicspylibczi' (import-error) src/precon3d/resampler.py:29:0: E0401: Unable to import 'seaborn' (import-error) src/precon3d/resampler.py:140:4: C0103: Variable name "X" doesn't conform to snake_case naming style (invalid-name) src/precon3d/resampler.py:141:4: C0103: Variable name "Y" doesn't conform to snake_case naming style (invalid-name) src/precon3d/resampler.py:142:4: C0103: Variable name "Z" doesn't conform to snake_case naming style (invalid-name) src/precon3d/resampler.py:145:4: C0103: Variable name "A" doesn't conform to snake_case naming style (invalid-name) src/precon3d/resampler.py:146:4: C0103: Variable name "C" doesn't conform to snake_case naming style (invalid-name) src/precon3d/resampler.py:165:0: R0914: Too many local variables (20/15) (too-many-locals) src/precon3d/resampler.py:176:4: C0103: Variable name "X" doesn't conform to snake_case naming style (invalid-name) src/precon3d/resampler.py:177:4: C0103: Variable name "Y" doesn't conform to snake_case naming style (invalid-name) src/precon3d/resampler.py:178:4: C0103: Variable name "Z" doesn't conform to snake_case naming style (invalid-name) src/precon3d/resampler.py:181:4: C0103: Variable name "A" doesn't conform to snake_case naming style (invalid-name) src/precon3d/resampler.py:182:4: C0103: Variable name "C" doesn't conform to snake_case naming style (invalid-name) src/precon3d/resampler.py:197:4: C0103: Variable name "X_grid" doesn't conform to snake_case naming style (invalid-name) src/precon3d/resampler.py:197:12: C0103: Variable name "Y_grid" doesn't conform to snake_case naming style (invalid-name) src/precon3d/resampler.py:198:4: C0103: Variable name "Z_grid" doesn't conform to snake_case naming style (invalid-name) src/precon3d/resampler.py:248:0: R0914: Too many local variables (21/15) (too-many-locals) src/precon3d/resampler.py:301:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding) src/precon3d/resampler.py:435:24: W0123: Use of eval (eval-used) src/precon3d/resampler.py:713:0: C0116: Missing function or method docstring (missing-function-docstring) src/precon3d/resampler.py:829:0: R0914: Too many local variables (16/15) (too-many-locals) src/precon3d/resampler.py:882:8: W0612: Unused variable 'fig' (unused-variable) src/precon3d/resampler.py:6:0: C0411: standard import "typing.NamedTuple" should be placed before third party import "numpy.typing.NDArray" (wrong-import-order) src/precon3d/resampler.py:7:0: C0411: standard import "pathlib.Path" should be placed before third party import "numpy.typing.NDArray" (wrong-import-order) src/precon3d/resampler.py:13:0: C0411: standard import "datetime.datetime" should be placed before third party imports "numpy.typing.NDArray", "matplotlib.pyplot", "mpl_toolkits.mplot3d.Axes3D", "rich.progress.Progress" (wrong-import-order) src/precon3d/resampler.py:16:0: C0411: standard import "csv" should be placed before third party imports "numpy.typing.NDArray", "matplotlib.pyplot", "mpl_toolkits.mplot3d.Axes3D", "rich.progress.Progress", "typer" (wrong-import-order) src/precon3d/resampler.py:17:0: C0411: standard import "os" should be placed before third party imports "numpy.typing.NDArray", "matplotlib.pyplot", "mpl_toolkits.mplot3d.Axes3D", "rich.progress.Progress", "typer" (wrong-import-order) src/precon3d/resampler.py:18:0: C0411: standard import "re" should be placed before third party imports "numpy.typing.NDArray", "matplotlib.pyplot", "mpl_toolkits.mplot3d.Axes3D", "rich.progress.Progress", "typer" (wrong-import-order) src/precon3d/resampler.py:19:0: C0411: standard import "sys" should be placed before third party imports "numpy.typing.NDArray", "matplotlib.pyplot", "mpl_toolkits.mplot3d.Axes3D", "rich.progress.Progress", "typer" (wrong-import-order) src/precon3d/resampler.py:20:0: C0411: standard import "shutil" should be placed before third party imports "numpy.typing.NDArray", "matplotlib.pyplot", "mpl_toolkits.mplot3d.Axes3D", "rich.progress.Progress", "typer" (wrong-import-order) src/precon3d/resampler.py:21:0: C0411: standard import "time" should be placed before third party imports "numpy.typing.NDArray", "matplotlib.pyplot", "mpl_toolkits.mplot3d.Axes3D", "rich.progress.Progress", "typer" (wrong-import-order) src/precon3d/resampler.py:26:0: C0412: Imports from package matplotlib are not grouped (ungrouped-imports) src/precon3d/resampler.py:9:0: W0611: Unused Axes3D imported from mpl_toolkits.mplot3d (unused-import) src/precon3d/resampler.py:12:0: W0611: Unused TimeElapsedColumn imported from rich.progress (unused-import) src/precon3d/resampler.py:13:0: W0611: Unused datetime imported from datetime (unused-import) src/precon3d/resampler.py:17:0: W0611: Unused import os (unused-import) src/precon3d/resampler.py:20:0: W0611: Unused import shutil (unused-import) src/precon3d/resampler.py:21:0: W0611: Unused import time (unused-import) src/precon3d/resampler.py:37:0: W0614: Unused import(s) pytz, npt, ValueExpectedTrueError, UserSettings, ManualShadingAttrs, ShadingConfig, FijiAttrs, NormalizationAttrs, StitchingAttrs, StitchingParams, TilePosition, Mosaic, TileStack, BoundingBox, ChannelMetadata, SceneMetadata, CZIMetadata, Any, Dict and Union from wildcard import of precon3d.custom_types (unused-wildcard-import) ************* Module precon3d.custom_types src/precon3d/custom_types.py:14:0: E0401: Unable to import 'pytz' (import-error) src/precon3d/custom_types.py:19:0: E0401: Unable to import 'numpy.typing' (import-error) src/precon3d/custom_types.py:439:19: W0718: Catching too general exception Exception (broad-exception-caught) src/precon3d/custom_types.py:15:0: C0411: standard import "datetime.datetime" should be placed before third party import "pytz" (wrong-import-order) src/precon3d/custom_types.py:16:0: C0411: standard import "pathlib.Path" should be placed before third party import "pytz" (wrong-import-order) src/precon3d/custom_types.py:17:0: C0411: standard import "typing.Any" should be placed before third party import "pytz" (wrong-import-order) src/precon3d/custom_types.py:1:0: R0801: Similar lines in 2 files ==precon3d.cropper:[174:193] ==precon3d.downscaler:[321:340] toc = time.perf_counter() typer.echo( f"""total time: {toc - tic:0.2f} seconds {(toc - tic)/60:0.2f} minutes {(toc - tic)/3600:0.2f} hours""" ) @app.callback() def callback(): """ precon3d.downscaler downscales images. """ if __name__ == "__main__": app() (duplicate-code) src/precon3d/custom_types.py:1:0: R0801: Similar lines in 2 files ==precon3d.czi_info:[241:249] ==precon3d.resampler:[786:797] sp_writer.writerow( [ "File name", "Scene name", "Average height (um)", "All heights (um)", ] ) (duplicate-code) src/precon3d/custom_types.py:1:0: R0801: Similar lines in 2 files ==precon3d.cropper:[90:97] ==precon3d.downscaler:[99:106] with Progress( TextColumn("[progress.description]{task.description}"), BarColumn(), TextColumn("[progress.percentage]{task.percentage:>3.1f}%"), TextColumn("[bold blue]{task.completed}/{task.total}"), ) as progress: task = progress.add_task( (duplicate-code) src/precon3d/custom_types.py:1:0: R0801: Similar lines in 2 files ==precon3d.post_stitch_utils:[341:354] ==precon3d.utility:[765:778] n_images = len(filepaths_list) print(f"Found {n_images} images") def get_image_size(filepath): with Image.open(filepath) as img: return img.size # Returns (width, height) # Use ThreadPoolExecutor to parallelize the retrieval of image sizes with ThreadPoolExecutor() as executor: all_image_sizes = list(executor.map(get_image_size, filepaths_list)) # Convert (width, height) to (height, width) and find min dimensions all_image_sizes = [(height, width) for width, height in all_image_sizes] (duplicate-code) src/precon3d/custom_types.py:1:0: R0801: Similar lines in 2 files ==precon3d.czi_info:[273:281] ==precon3d.resampler:[98:106] metadata = CziFile(czi_file_path).meta all_scene_sp = [] for each_scene in metadata.findall(".//TileRegion"): if each_scene.find(".//IsUsedForAcquisition").text == "true": scene_name = each_scene.attrib["Name"] scene_z = each_scene.find(".//Z").text (duplicate-code) src/precon3d/custom_types.py:1:0: R0801: Similar lines in 2 files ==precon3d.post_stitch_utils:[341:353] ==precon3d.utility:[448:461] n_images = len(filepaths_list) print(f"Found {n_images} images") # Helper function to retrieve the size of an image def get_image_size(filepath: Path) -> tuple[int, int]: with Image.open(filepath) as img: return img.size # Returns (width, height) # Use ThreadPoolExecutor to parallelize the retrieval of image sizes with ThreadPoolExecutor() as executor: all_image_sizes = list(executor.map(get_image_size, filepaths_list)) # Check if all images have the same size (duplicate-code) src/precon3d/custom_types.py:1:0: R0401: Cyclic import (precon3d.czi_info -> precon3d.mosaic_utils) (cyclic-import) ----------------------------------- Your code has been rated at 6.55/10