From 87596004f48f3fbaead36a96c1842e95085db29f Mon Sep 17 00:00:00 2001 From: Amr Kayid Date: Sat, 25 May 2024 04:02:44 +0000 Subject: [PATCH] pylinting --- Makefile | 14 +++ fanan/config/base.py | 10 +- fanan/optimization/lr_schedules.py | 17 +-- fanan/portal/huggingface.py | 7 +- fanan/utils/image_utils.py | 2 +- fanan/utils/logger.py | 60 ++++----- poetry.lock | 189 ++++++++++++++++++++++------- pyproject.toml | 11 ++ 8 files changed, 220 insertions(+), 90 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..03cfc71 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +PYTHON_MODULE_PATH=fanan + +clean: + find . -name "*.pyc" -type f -delete + find . -name "__pycache__" -type d -delete + find . -name ".ipynb_checkpoints" -type d -delete + +format: + ruff check ${PYTHON_MODULE_PATH} + docformatter --in-place --recursive ${PYTHON_MODULE_PATH} + +pylinting: + ## https://vald-phoenix.github.io/pylint-errors/ + pylint --output-format=colorized ${PYTHON_MODULE_PATH} diff --git a/fanan/config/base.py b/fanan/config/base.py index 8ca91a7..c00df63 100644 --- a/fanan/config/base.py +++ b/fanan/config/base.py @@ -28,7 +28,7 @@ def __init__(self, initial_dictionary: dict | None = None, **kwargs) -> None: class DataConfig(ConfigDict): - """data configuration class.""" + """Data configuration class.""" def __init__(self, initial_dictionary: dict | None = None, **kwargs) -> None: super().__init__(initial_dictionary=initial_dictionary, **kwargs) @@ -46,7 +46,7 @@ def __init__(self, initial_dictionary: dict | None = None, **kwargs) -> None: super().__init__(initial_dictionary=initial_dictionary, **kwargs) self.timesteps: int = 1000 self.beta_1: float = 1e-4 - self.beta_T: float = 0.02 + self.beta_t: float = 0.02 self.timestep_size: float = 0.001 self.noise_schedule: str = "linear" self.ema_decay: float = 0.999 @@ -94,7 +94,7 @@ def __init__(self, initial_dictionary: dict | None = None, **kwargs) -> None: class TrainingConfig(ConfigDict): - """training configuration class.""" + """Training configuration class.""" def __init__(self, initial_dictionary: dict | None = None, **kwargs) -> None: super().__init__(initial_dictionary=initial_dictionary, **kwargs) @@ -107,7 +107,7 @@ def __init__(self, initial_dictionary: dict | None = None, **kwargs) -> None: class FananConfig(ConfigDict): - """fanan configuration class.""" + """Fanan configuration class.""" def __init__(self, initial_dictionary: dict | None = None, **kwargs) -> None: super().__init__(initial_dictionary=initial_dictionary, **kwargs) @@ -128,7 +128,7 @@ def __init__(self, initial_dictionary: dict | None = None, **kwargs) -> None: @classmethod def read_config_from_yaml(cls, file_path: str): - with open(file_path) as file: + with open(file_path, encoding="utf-8") as file: updates = yaml.safe_load(file) cfg = cls() diff --git a/fanan/optimization/lr_schedules.py b/fanan/optimization/lr_schedules.py index f8d9e0a..ccd30c3 100644 --- a/fanan/optimization/lr_schedules.py +++ b/fanan/optimization/lr_schedules.py @@ -7,14 +7,15 @@ def create_lr_schedule(config: Config): lr_config = config.optimization.lr_schedule schedule_type = lr_config.schedule_type lr_kwargs = lr_config.lr_kwargs - if schedule_type == "constant": - return optax.constant_schedule(**lr_kwargs) - elif schedule_type == "constant_warmup": - return _constant_with_warmup(**lr_kwargs) - elif schedule_type == "cosine": - return _cosine_with_warmup(**lr_kwargs) - else: - raise NotImplementedError(schedule_type) + match schedule_type: + case "constant": + return optax.constant_schedule(**lr_kwargs) + case "constant_warmup": + return _constant_with_warmup(**lr_kwargs) + case "cosine": + return _cosine_with_warmup(**lr_kwargs) + case _: + raise NotImplementedError(schedule_type) def _constant_with_warmup(value: float, warmup_steps: int): diff --git a/fanan/portal/huggingface.py b/fanan/portal/huggingface.py index da38cf9..dcfc850 100644 --- a/fanan/portal/huggingface.py +++ b/fanan/portal/huggingface.py @@ -46,7 +46,8 @@ def load_tokenizer( local_cache_dir: str | None = None, trust_remote_code: bool = True, ) -> PreTrainedTokenizer | PreTrainedTokenizerFast: - """Load a tokenizer from a model name or path, with optional revision and local cache directory.""" + """Load a tokenizer from a model name or path, with optional revision and + local cache directory.""" if _is_url_like(model_name_or_path): if revision is not None: raise ValueError("revision is not supported for URLs") @@ -62,5 +63,5 @@ def load_tokenizer( os.path.join(local_cache_dir, base_path), trust_remote_code=trust_remote_code, ) - else: - return AutoTokenizer.from_pretrained(model_name_or_path, revision=revision, trust_remote_code=trust_remote_code) + + return AutoTokenizer.from_pretrained(model_name_or_path, revision=revision, trust_remote_code=trust_remote_code) diff --git a/fanan/utils/image_utils.py b/fanan/utils/image_utils.py index 8dbf3ff..0bf1f61 100644 --- a/fanan/utils/image_utils.py +++ b/fanan/utils/image_utils.py @@ -51,6 +51,6 @@ def upsample2d(x, scale: Union[int, Tuple[int, int]], method: str = "bilinear"): elif len(scale) == 2: h_out, w_out = scale[0] * h, scale[1] * w else: - raise ValueError("scale argument should be either int" "or Tuple[int, int]") + raise ValueError("scale argument should be either int or Tuple[int, int]") return jax.image.resize(x, shape=(b, h_out, w_out, c), method=method) diff --git a/fanan/utils/logger.py b/fanan/utils/logger.py index d44c10d..d2ea4ac 100644 --- a/fanan/utils/logger.py +++ b/fanan/utils/logger.py @@ -1,41 +1,41 @@ -import logging -import os -from datetime import datetime +# import logging +# import os +# from datetime import datetime -from rich.logging import RichHandler +# from rich.logging import RichHandler -def setup_logger(output_dir="logs"): - # Create the output directory if it doesn't exist - os.makedirs(output_dir, exist_ok=True) +# def setup_logger(output_dir="logs"): +# # Create the output directory if it doesn't exist +# os.makedirs(output_dir, exist_ok=True) - # Create a logger - logger = logging.getLogger(__name__) +# # Create a logger +# logger = logging.getLogger(__name__) - # Configure the RichHandler with the desired formatting - rich_handler = RichHandler( - rich_tracebacks=True, - markup=True, - show_time=True, - omit_repeated_times=False, - show_level=True, - show_path=True, - tracebacks_show_locals=True, - ) +# # Configure the RichHandler with the desired formatting +# rich_handler = RichHandler( +# rich_tracebacks=True, +# markup=True, +# show_time=True, +# omit_repeated_times=False, +# show_level=True, +# show_path=True, +# tracebacks_show_locals=True, +# ) - # Add the RichHandler to the logger - logger.addHandler(rich_handler) +# # Add the RichHandler to the logger +# logger.addHandler(rich_handler) - # Get the current date and time - current_datetime = datetime.now().strftime("%Y%m%d_%H%M%S") +# # Get the current date and time +# current_datetime = datetime.now().strftime("%Y%m%d_%H%M%S") - # Create a FileHandler with the specified output directory and set the formatter - file_handler = logging.FileHandler(os.path.join(output_dir, f"output_{current_datetime}.log")) +# # Create a FileHandler with the specified output directory and set the formatter +# file_handler = logging.FileHandler(os.path.join(output_dir, f"output_{current_datetime}.log")) - # Add the FileHandler to the logger - logger.addHandler(file_handler) +# # Add the FileHandler to the logger +# logger.addHandler(file_handler) - # Set the logging level - logger.setLevel(logging.INFO) +# # Set the logging level +# logger.setLevel(logging.INFO) - return logger +# return logger diff --git a/poetry.lock b/poetry.lock index 097ee91..cded335 100644 --- a/poetry.lock +++ b/poetry.lock @@ -170,6 +170,20 @@ etils = {version = "*", extras = ["epath"]} [package.extras] beam = ["apache-beam[gcp] (>=2.50.0)", "google-cloud-storage (>=2.11.0)", "tensorflow (>=2.14.0)"] +[[package]] +name = "astroid" +version = "3.2.2" +description = "An abstract syntax tree for Python with inference support." +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "astroid-3.2.2-py3-none-any.whl", hash = "sha256:e8a0083b4bb28fcffb6207a3bfc9e5d0a68be951dd7e336d5dcf639c682388c0"}, + {file = "astroid-3.2.2.tar.gz", hash = "sha256:8ead48e31b92b2e217b6c9733a21afafe479d52d6e164dd25fb1a770c7c3cf94"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} + [[package]] name = "asttokens" version = "2.4.1" @@ -645,6 +659,24 @@ files = [ {file = "dm_tree-0.1.8-cp39-cp39-win_amd64.whl", hash = "sha256:8ed3564abed97c806db122c2d3e1a2b64c74a63debe9903aad795167cc301368"}, ] +[[package]] +name = "docformatter" +version = "1.7.5" +description = "Formats docstrings to follow PEP 257" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "docformatter-1.7.5-py3-none-any.whl", hash = "sha256:a24f5545ed1f30af00d106f5d85dc2fce4959295687c24c8f39f5263afaf9186"}, + {file = "docformatter-1.7.5.tar.gz", hash = "sha256:ffed3da0daffa2e77f80ccba4f0e50bfa2755e1c10e130102571c890a61b246e"}, +] + +[package.dependencies] +charset_normalizer = ">=3.0.0,<4.0.0" +untokenize = ">=0.1.1,<0.2.0" + +[package.extras] +tomli = ["tomli (>=2.0.0,<3.0.0)"] + [[package]] name = "docker-pycreds" version = "0.4.0" @@ -687,7 +719,7 @@ fsspec = {version = "*", optional = true, markers = "extra == \"epath\""} importlib_resources = {version = "*", optional = true, markers = "extra == \"epath\""} numpy = {version = "*", optional = true, markers = "extra == \"enp\""} tqdm = {version = "*", optional = true, markers = "extra == \"etqdm\""} -typing_extensions = {version = "*", optional = true, markers = "extra == \"epath\""} +typing_extensions = {version = "*", optional = true, markers = "extra == \"epy\""} zipp = {version = "*", optional = true, markers = "extra == \"epath\""} [package.extras] @@ -1255,6 +1287,20 @@ qtconsole = ["qtconsole"] test = ["pickleshare", "pytest", "pytest-asyncio (<0.22)", "testpath"] test-extra = ["curio", "ipython[test]", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.23)", "pandas", "trio"] +[[package]] +name = "isort" +version = "5.13.2" +description = "A Python utility / library to sort Python imports." +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, + {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, +] + +[package.extras] +colors = ["colorama (>=0.4.6)"] + [[package]] name = "jax" version = "0.4.28" @@ -1620,6 +1666,17 @@ files = [ [package.dependencies] traitlets = "*" +[[package]] +name = "mccabe" +version = "0.7.0" +description = "McCabe checker, plugin for flake8" +optional = false +python-versions = ">=3.6" +files = [ + {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, + {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, +] + [[package]] name = "mdit-py-plugins" version = "0.4.1" @@ -2170,13 +2227,13 @@ orbax-checkpoint = ">=0.1.8" [[package]] name = "orbax-checkpoint" -version = "0.5.11" +version = "0.5.14" description = "Orbax Checkpoint" optional = false python-versions = ">=3.9" files = [ - {file = "orbax_checkpoint-0.5.11-py3-none-any.whl", hash = "sha256:a0950119f6fece0d2e2d84e04c6ca2136b6c2a59ef996927765f8511d8ee4139"}, - {file = "orbax_checkpoint-0.5.11.tar.gz", hash = "sha256:64161132c83888c2ccee4db80078914507e5f35ad47bcf5bfc5fa2b07036a2a7"}, + {file = "orbax_checkpoint-0.5.14-py3-none-any.whl", hash = "sha256:78669617821081f5e455d50bf576891f1b60ca018262502584b6febc65b4881e"}, + {file = "orbax_checkpoint-0.5.14.tar.gz", hash = "sha256:97a42597fa2fcbe7de914decd6aefbf8303216f3a66af02ab0c5a0ca0811facd"}, ] [package.dependencies] @@ -2793,6 +2850,31 @@ files = [ [package.extras] windows-terminal = ["colorama (>=0.4.6)"] +[[package]] +name = "pylint" +version = "3.2.2" +description = "python code static checker" +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "pylint-3.2.2-py3-none-any.whl", hash = "sha256:3f8788ab20bb8383e06dd2233e50f8e08949cfd9574804564803441a4946eab4"}, + {file = "pylint-3.2.2.tar.gz", hash = "sha256:d068ca1dfd735fb92a07d33cb8f288adc0f6bc1287a139ca2425366f7cbe38f8"}, +] + +[package.dependencies] +astroid = ">=3.2.2,<=3.3.0-dev0" +colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} +dill = {version = ">=0.2", markers = "python_version < \"3.11\""} +isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" +mccabe = ">=0.6,<0.8" +platformdirs = ">=2.2.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} +tomlkit = ">=0.10.1" + +[package.extras] +spelling = ["pyenchant (>=3.2,<4.0)"] +testutils = ["gitpython (>3)"] + [[package]] name = "python-dateutil" version = "2.9.0.post0" @@ -3047,13 +3129,13 @@ files = [ [[package]] name = "requests" -version = "2.32.1" +version = "2.32.2" description = "Python HTTP for Humans." optional = false python-versions = ">=3.8" files = [ - {file = "requests-2.32.1-py3-none-any.whl", hash = "sha256:21ac9465cdf8c1650fe1ecde8a71669a93d4e6f147550483a2967d08396a56a5"}, - {file = "requests-2.32.1.tar.gz", hash = "sha256:eb97e87e64c79e64e5b8ac75cee9dd1f97f49e289b083ee6be96268930725685"}, + {file = "requests-2.32.2-py3-none-any.whl", hash = "sha256:fc06670dd0ed212426dfeb94fc1b983d917c4f9847c863f313c9dfaaffb7c23c"}, + {file = "requests-2.32.2.tar.gz", hash = "sha256:dd951ff5ecf3e3b3aa26b40703ba77495dab41da839ae72ef3c8e5d8e2433289"}, ] [package.dependencies] @@ -3356,36 +3438,36 @@ torch = ["safetensors[numpy]", "torch (>=1.10)"] [[package]] name = "scipy" -version = "1.13.0" +version = "1.13.1" description = "Fundamental algorithms for scientific computing in Python" optional = false python-versions = ">=3.9" files = [ - {file = "scipy-1.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ba419578ab343a4e0a77c0ef82f088238a93eef141b2b8017e46149776dfad4d"}, - {file = "scipy-1.13.0-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:22789b56a999265431c417d462e5b7f2b487e831ca7bef5edeb56efe4c93f86e"}, - {file = "scipy-1.13.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05f1432ba070e90d42d7fd836462c50bf98bd08bed0aa616c359eed8a04e3922"}, - {file = "scipy-1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8434f6f3fa49f631fae84afee424e2483289dfc30a47755b4b4e6b07b2633a4"}, - {file = "scipy-1.13.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:dcbb9ea49b0167de4167c40eeee6e167caeef11effb0670b554d10b1e693a8b9"}, - {file = "scipy-1.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:1d2f7bb14c178f8b13ebae93f67e42b0a6b0fc50eba1cd8021c9b6e08e8fb1cd"}, - {file = "scipy-1.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0fbcf8abaf5aa2dc8d6400566c1a727aed338b5fe880cde64907596a89d576fa"}, - {file = "scipy-1.13.0-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:5e4a756355522eb60fcd61f8372ac2549073c8788f6114449b37e9e8104f15a5"}, - {file = "scipy-1.13.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5acd8e1dbd8dbe38d0004b1497019b2dbbc3d70691e65d69615f8a7292865d7"}, - {file = "scipy-1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9ff7dad5d24a8045d836671e082a490848e8639cabb3dbdacb29f943a678683d"}, - {file = "scipy-1.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4dca18c3ffee287ddd3bc8f1dabaf45f5305c5afc9f8ab9cbfab855e70b2df5c"}, - {file = "scipy-1.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:a2f471de4d01200718b2b8927f7d76b5d9bde18047ea0fa8bd15c5ba3f26a1d6"}, - {file = "scipy-1.13.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d0de696f589681c2802f9090fff730c218f7c51ff49bf252b6a97ec4a5d19e8b"}, - {file = "scipy-1.13.0-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:b2a3ff461ec4756b7e8e42e1c681077349a038f0686132d623fa404c0bee2551"}, - {file = "scipy-1.13.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6bf9fe63e7a4bf01d3645b13ff2aa6dea023d38993f42aaac81a18b1bda7a82a"}, - {file = "scipy-1.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e7626dfd91cdea5714f343ce1176b6c4745155d234f1033584154f60ef1ff42"}, - {file = "scipy-1.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:109d391d720fcebf2fbe008621952b08e52907cf4c8c7efc7376822151820820"}, - {file = "scipy-1.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:8930ae3ea371d6b91c203b1032b9600d69c568e537b7988a3073dfe4d4774f21"}, - {file = "scipy-1.13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5407708195cb38d70fd2d6bb04b1b9dd5c92297d86e9f9daae1576bd9e06f602"}, - {file = "scipy-1.13.0-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:ac38c4c92951ac0f729c4c48c9e13eb3675d9986cc0c83943784d7390d540c78"}, - {file = "scipy-1.13.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09c74543c4fbeb67af6ce457f6a6a28e5d3739a87f62412e4a16e46f164f0ae5"}, - {file = "scipy-1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28e286bf9ac422d6beb559bc61312c348ca9b0f0dae0d7c5afde7f722d6ea13d"}, - {file = "scipy-1.13.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:33fde20efc380bd23a78a4d26d59fc8704e9b5fd9b08841693eb46716ba13d86"}, - {file = "scipy-1.13.0-cp39-cp39-win_amd64.whl", hash = "sha256:45c08bec71d3546d606989ba6e7daa6f0992918171e2a6f7fbedfa7361c2de1e"}, - {file = "scipy-1.13.0.tar.gz", hash = "sha256:58569af537ea29d3f78e5abd18398459f195546bb3be23d16677fb26616cc11e"}, + {file = "scipy-1.13.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:20335853b85e9a49ff7572ab453794298bcf0354d8068c5f6775a0eabf350aca"}, + {file = "scipy-1.13.1-cp310-cp310-macosx_12_0_arm64.whl", hash = "sha256:d605e9c23906d1994f55ace80e0125c587f96c020037ea6aa98d01b4bd2e222f"}, + {file = "scipy-1.13.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cfa31f1def5c819b19ecc3a8b52d28ffdcc7ed52bb20c9a7589669dd3c250989"}, + {file = "scipy-1.13.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f26264b282b9da0952a024ae34710c2aff7d27480ee91a2e82b7b7073c24722f"}, + {file = "scipy-1.13.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:eccfa1906eacc02de42d70ef4aecea45415f5be17e72b61bafcfd329bdc52e94"}, + {file = "scipy-1.13.1-cp310-cp310-win_amd64.whl", hash = "sha256:2831f0dc9c5ea9edd6e51e6e769b655f08ec6db6e2e10f86ef39bd32eb11da54"}, + {file = "scipy-1.13.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:27e52b09c0d3a1d5b63e1105f24177e544a222b43611aaf5bc44d4a0979e32f9"}, + {file = "scipy-1.13.1-cp311-cp311-macosx_12_0_arm64.whl", hash = "sha256:54f430b00f0133e2224c3ba42b805bfd0086fe488835effa33fa291561932326"}, + {file = "scipy-1.13.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e89369d27f9e7b0884ae559a3a956e77c02114cc60a6058b4e5011572eea9299"}, + {file = "scipy-1.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a78b4b3345f1b6f68a763c6e25c0c9a23a9fd0f39f5f3d200efe8feda560a5fa"}, + {file = "scipy-1.13.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:45484bee6d65633752c490404513b9ef02475b4284c4cfab0ef946def50b3f59"}, + {file = "scipy-1.13.1-cp311-cp311-win_amd64.whl", hash = "sha256:5713f62f781eebd8d597eb3f88b8bf9274e79eeabf63afb4a737abc6c84ad37b"}, + {file = "scipy-1.13.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5d72782f39716b2b3509cd7c33cdc08c96f2f4d2b06d51e52fb45a19ca0c86a1"}, + {file = "scipy-1.13.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:017367484ce5498445aade74b1d5ab377acdc65e27095155e448c88497755a5d"}, + {file = "scipy-1.13.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:949ae67db5fa78a86e8fa644b9a6b07252f449dcf74247108c50e1d20d2b4627"}, + {file = "scipy-1.13.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de3ade0e53bc1f21358aa74ff4830235d716211d7d077e340c7349bc3542e884"}, + {file = "scipy-1.13.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:2ac65fb503dad64218c228e2dc2d0a0193f7904747db43014645ae139c8fad16"}, + {file = "scipy-1.13.1-cp312-cp312-win_amd64.whl", hash = "sha256:cdd7dacfb95fea358916410ec61bbc20440f7860333aee6d882bb8046264e949"}, + {file = "scipy-1.13.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:436bbb42a94a8aeef855d755ce5a465479c721e9d684de76bf61a62e7c2b81d5"}, + {file = "scipy-1.13.1-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:8335549ebbca860c52bf3d02f80784e91a004b71b059e3eea9678ba994796a24"}, + {file = "scipy-1.13.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d533654b7d221a6a97304ab63c41c96473ff04459e404b83275b60aa8f4b7004"}, + {file = "scipy-1.13.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:637e98dcf185ba7f8e663e122ebf908c4702420477ae52a04f9908707456ba4d"}, + {file = "scipy-1.13.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a014c2b3697bde71724244f63de2476925596c24285c7a637364761f8710891c"}, + {file = "scipy-1.13.1-cp39-cp39-win_amd64.whl", hash = "sha256:392e4ec766654852c25ebad4f64e4e584cf19820b980bc04960bca0b0cd6eaa2"}, + {file = "scipy-1.13.1.tar.gz", hash = "sha256:095a87a0312b08dfd6a6155cbbd310a8c51800fc931b8c0b84003014b874ed3c"}, ] [package.dependencies] @@ -3398,13 +3480,13 @@ test = ["array-api-strict", "asv", "gmpy2", "hypothesis (>=6.30)", "mpmath", "po [[package]] name = "sentry-sdk" -version = "2.2.1" +version = "2.3.1" description = "Python client for Sentry (https://sentry.io)" optional = false python-versions = ">=3.6" files = [ - {file = "sentry_sdk-2.2.1-py2.py3-none-any.whl", hash = "sha256:7d617a1b30e80c41f3b542347651fcf90bb0a36f3a398be58b4f06b79c8d85bc"}, - {file = "sentry_sdk-2.2.1.tar.gz", hash = "sha256:8aa2ec825724d8d9d645cab68e6034928b1a6a148503af3e361db3fa6401183f"}, + {file = "sentry_sdk-2.3.1-py2.py3-none-any.whl", hash = "sha256:c5aeb095ba226391d337dd42a6f9470d86c9fc236ecc71cfc7cd1942b45010c6"}, + {file = "sentry_sdk-2.3.1.tar.gz", hash = "sha256:139a71a19f5e9eb5d3623942491ce03cf8ebc14ea2e39ba3e6fe79560d8a5b1f"}, ] [package.dependencies] @@ -3874,13 +3956,13 @@ tests = ["pytest", "pytest-cov"] [[package]] name = "textual" -version = "0.62.0" +version = "0.63.3" description = "Modern Text User Interface framework" optional = false python-versions = "<4.0,>=3.8" files = [ - {file = "textual-0.62.0-py3-none-any.whl", hash = "sha256:5208c1df961848889ff0a0c7628f203a2bc773fc2a45d6e842b27a8e34c15499"}, - {file = "textual-0.62.0.tar.gz", hash = "sha256:563c1c13a087c8f4fef8a47aae43e1274139e85d00e0b0898b8eb89c5e494997"}, + {file = "textual-0.63.3-py3-none-any.whl", hash = "sha256:a9921fb3fbbed6b2dce1a375023064f79bd461e6d53c13534b4c12e51bb29ba7"}, + {file = "textual-0.63.3.tar.gz", hash = "sha256:e293a2f789020fc324653a62c2bc210343b790b44b77f928f938ac747bdf6110"}, ] [package.dependencies] @@ -4030,6 +4112,17 @@ files = [ {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] +[[package]] +name = "tomlkit" +version = "0.12.5" +description = "Style preserving TOML library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomlkit-0.12.5-py3-none-any.whl", hash = "sha256:af914f5a9c59ed9d0762c7b64d3b5d5df007448eb9cd2edc8a46b1eafead172f"}, + {file = "tomlkit-0.12.5.tar.gz", hash = "sha256:eef34fba39834d4d6b73c9ba7f3e4d1c417a4e56f89a7e96e090dd0d24b8fb3c"}, +] + [[package]] name = "toolz" version = "0.12.1" @@ -4161,13 +4254,13 @@ test = ["mypy", "pytest", "typing-extensions"] [[package]] name = "typing-extensions" -version = "4.11.0" +version = "4.12.0" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, - {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, + {file = "typing_extensions-4.12.0-py3-none-any.whl", hash = "sha256:b349c66bea9016ac22978d800cfff206d5f9816951f12a7d0ec5578b0a819594"}, + {file = "typing_extensions-4.12.0.tar.gz", hash = "sha256:8cbcdc8606ebcb0d95453ad7dc5065e6237b6aa230a31e81d0f440c30fed5fd8"}, ] [[package]] @@ -4195,6 +4288,16 @@ files = [ [package.extras] test = ["coverage", "pytest", "pytest-cov"] +[[package]] +name = "untokenize" +version = "0.1.1" +description = "Transforms tokens into original source code (while preserving whitespace)." +optional = false +python-versions = "*" +files = [ + {file = "untokenize-0.1.1.tar.gz", hash = "sha256:3865dbbbb8efb4bb5eaa72f1be7f3e0be00ea8b7f125c69cbd1f5fda926f37a2"}, +] + [[package]] name = "urllib3" version = "2.2.1" @@ -4633,4 +4736,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more [metadata] lock-version = "2.0" python-versions = "3.10.12" -content-hash = "48440346be87ac80ea863235aaf74f1091accd69c505e0d3ea0b9fb446d7940d" +content-hash = "1061e3d04b154130497c7b71038ac1b7a6f38614f26527593d0396054367b7b5" diff --git a/pyproject.toml b/pyproject.toml index 55fa33b..e0442ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,8 @@ ruff = "0.4.2" pre-commit = "3.7.0" ipdb = "0.13.13" coverage = "7.5.1" +pylint = "3.2.2" +docformatter = "1.7.5" [build-system] requires = ["poetry-core"] @@ -88,5 +90,14 @@ docstring-code-format = false docstring-code-line-length = "dynamic" +[tool.pylint] +disable = [ + "missing-module-docstring", + "missing-function-docstring", + "missing-class-docstring", + "line-too-long", + "logging-fstring-interpolation", +] + [tool.poetry.scripts] fanan = 'fanan.fanan:main'