dycw-utilities 0.124.0__tar.gz → 0.125.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/PKG-INFO +3 -5
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/pyproject.toml +5 -8
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_more_itertools.py +29 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/__init__.py +1 -1
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/more_itertools.py +62 -6
- dycw_utilities-0.124.0/src/tests/test_astor.py +0 -33
- dycw_utilities-0.124.0/src/utilities/astor.py +0 -28
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/.gitignore +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/LICENSE +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/README.md +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/__init__.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/conftest.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/__init__.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_missing/__init__.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_missing/module.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_with/__init__.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_with/outer_1.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_with/outer_2.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_with/subpackage/__init__.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_with/subpackage/inner_1.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_with/subpackage/inner_2.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_with/subpackage/inner_3.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_without/__init__.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_without/module_1.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_without/module_2.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/standalone.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/with_imports.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/regressions/test_pytest_regressions/TestMultipleRegressionFixtures__test_main__obj.json +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/regressions/test_pytest_regressions/TestMultipleRegressionFixtures__test_main__series.json +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_int.json +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_literal__false.json +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_literal__true.json +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/regressions/test_pytest_regressions/TestOrjsonRegressionFixture__test_dataclass_nested.json +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/regressions/test_pytest_regressions/TestPolarsRegressionFixture__test_dataframe.json +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/regressions/test_pytest_regressions/TestPolarsRegressionFixture__test_series.json +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_altair.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_asyncio.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_atomicwrites.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_atools.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_cachetools.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_click.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_concurrent.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_contextlib.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_contextvars.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_cryptography.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_cvxpy.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_dataclasses.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_datetime.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_enum.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_errors.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_eventkit.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_fastapi.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_fpdf2.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_functions.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_functools.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_getpass.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_git.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_hashlib.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_http.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_hypothesis.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_importlib.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_ipython.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_iterables.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_jupyter.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_lightweight_charts.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_logging.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_loguru.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_luigi.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_math.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_memory_profiler.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_modules.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_numpy.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_operator.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_optuna.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_orjson.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_os.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_parse.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_pathlib.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_period.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_pickle.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_platform.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_polars.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_polars_ols.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_pqdm.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_pydantic.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_pyinstrument.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_pyrsistent.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_pytest.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_pytest_regressions.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_python_dotenv.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_random.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_re.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_redis.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_reprlib.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_rich.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_scipy.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_sentinel.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_shelve.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_slack_sdk.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_socket.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_sqlalchemy.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_sqlalchemy_polars.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_statsmodel.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_streamlit.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_sys.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_tempfile.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_tenacity.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_text.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_threading.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_timer.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/__init__.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/chain.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/decorated_async.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/decorated_sync.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/error_bind.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/many.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/one.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/recursive.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/task_group_one.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/task_group_two.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/two.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/untraced.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_types.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_typing.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_typing_funcs/__init__.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_typing_funcs/no_future.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_typing_funcs/with_future.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_tzdata.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_tzlocal.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_uuid.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_version.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_warnings.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_whenever.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_zipfile.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_zoneinfo.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/altair.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/asyncio.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/atomicwrites.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/atools.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/cachetools.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/click.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/concurrent.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/contextlib.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/contextvars.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/cryptography.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/cvxpy.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/dataclasses.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/datetime.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/enum.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/errors.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/eventkit.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/fastapi.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/fpdf2.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/functions.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/functools.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/getpass.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/git.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/hashlib.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/http.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/hypothesis.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/importlib.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/ipython.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/iterables.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/jupyter.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/lightweight_charts.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/logging.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/loguru.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/luigi.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/math.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/memory_profiler.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/modules.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/numpy.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/operator.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/optuna.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/orjson.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/os.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/parse.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/pathlib.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/period.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/pickle.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/platform.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/polars.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/polars_ols.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/pqdm.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/py.typed +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/pydantic.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/pyinstrument.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/pyrsistent.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/pytest.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/pytest_regressions.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/python_dotenv.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/random.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/re.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/redis.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/reprlib.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/rich.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/scipy.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/sentinel.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/shelve.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/slack_sdk.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/socket.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/sqlalchemy.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/sqlalchemy_polars.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/statsmodels.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/streamlit.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/sys.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/tempfile.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/tenacity.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/text.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/threading.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/timer.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/traceback.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/types.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/typing.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/tzdata.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/tzlocal.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/uuid.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/version.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/warnings.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/whenever.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/zipfile.py +0 -0
- {dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/utilities/zoneinfo.py +0 -0
@@ -1,12 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: dycw-utilities
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.125.0
|
4
4
|
Author-email: Derek Wan <d.wan@icloud.com>
|
5
5
|
License-File: LICENSE
|
6
6
|
Requires-Python: >=3.12
|
7
7
|
Requires-Dist: typing-extensions<4.14,>=4.13.1
|
8
8
|
Provides-Extra: test
|
9
|
-
Requires-Dist: hypothesis<6.132,>=6.131.
|
9
|
+
Requires-Dist: hypothesis<6.132,>=6.131.24; extra == 'test'
|
10
10
|
Requires-Dist: pytest-asyncio<0.27,>=0.26.0; extra == 'test'
|
11
11
|
Requires-Dist: pytest-cov<6.2,>=6.1.1; extra == 'test'
|
12
12
|
Requires-Dist: pytest-instafail<0.6,>=0.5.0; extra == 'test'
|
@@ -27,8 +27,6 @@ Requires-Dist: img2pdf<0.7,>=0.6.0; extra == 'zzz-test-altair'
|
|
27
27
|
Requires-Dist: polars-lts-cpu<1.31,>=1.30.0; extra == 'zzz-test-altair'
|
28
28
|
Requires-Dist: vl-convert-python<1.8,>=1.7.0; extra == 'zzz-test-altair'
|
29
29
|
Requires-Dist: whenever<0.9,>=0.8.2; extra == 'zzz-test-altair'
|
30
|
-
Provides-Extra: zzz-test-astor
|
31
|
-
Requires-Dist: astor<0.9,>=0.8.1; extra == 'zzz-test-astor'
|
32
30
|
Provides-Extra: zzz-test-asyncio
|
33
31
|
Provides-Extra: zzz-test-atomicwrites
|
34
32
|
Requires-Dist: atomicwrites<1.5,>=1.4.1; extra == 'zzz-test-atomicwrites'
|
@@ -80,7 +78,7 @@ Provides-Extra: zzz-test-hypothesis
|
|
80
78
|
Requires-Dist: aiosqlite<0.22,>=0.21.0; extra == 'zzz-test-hypothesis'
|
81
79
|
Requires-Dist: asyncpg<0.31,>=0.30.0; extra == 'zzz-test-hypothesis'
|
82
80
|
Requires-Dist: greenlet<3.3,>=3.2.0; extra == 'zzz-test-hypothesis'
|
83
|
-
Requires-Dist: hypothesis<6.132,>=6.131.
|
81
|
+
Requires-Dist: hypothesis<6.132,>=6.131.24; extra == 'zzz-test-hypothesis'
|
84
82
|
Requires-Dist: luigi<3.7,>=3.6.0; extra == 'zzz-test-hypothesis'
|
85
83
|
Requires-Dist: numpy<2.3,>=2.2.6; extra == 'zzz-test-hypothesis'
|
86
84
|
Requires-Dist: pathvalidate<3.3,>=3.2.3; extra == 'zzz-test-hypothesis'
|
@@ -11,7 +11,6 @@ dev = [
|
|
11
11
|
"aiohttp >= 3.11.16, < 3.12", # for slack
|
12
12
|
"aiosqlite >= 0.21.0, < 0.22",
|
13
13
|
"altair >= 5.5.0, < 5.6",
|
14
|
-
"astor >= 0.8.1, < 0.9",
|
15
14
|
"asyncpg >= 0.30.0, < 0.31", # for sqlalchemy async
|
16
15
|
"atomicwrites >= 1.4.1, < 1.5",
|
17
16
|
"atools >= 0.14.2, < 0.15",
|
@@ -26,7 +25,7 @@ dev = [
|
|
26
25
|
"fpdf2 >= 2.8.3, < 2.9",
|
27
26
|
"greenlet >= 3.2.0, < 3.3", # for sqlalchemy async
|
28
27
|
"httpx >= 0.28.1, < 0.29", # for fastapi
|
29
|
-
"hypothesis >= 6.131.
|
28
|
+
"hypothesis >= 6.131.24, < 6.132",
|
30
29
|
"img2pdf >= 0.6.0, < 0.7",
|
31
30
|
"lightweight-charts >= 2.1, < 2.2",
|
32
31
|
"loguru >= 0.7.3, < 0.8",
|
@@ -92,11 +91,11 @@ dependencies = [
|
|
92
91
|
name = "dycw-utilities"
|
93
92
|
readme = "README.md"
|
94
93
|
requires-python = ">= 3.12"
|
95
|
-
version = "0.
|
94
|
+
version = "0.125.0"
|
96
95
|
|
97
96
|
[project.optional-dependencies]
|
98
97
|
test = [
|
99
|
-
"hypothesis >= 6.131.
|
98
|
+
"hypothesis >= 6.131.24, < 6.132",
|
100
99
|
"pytest >= 8.3.5, < 8.4",
|
101
100
|
"pytest-asyncio >= 0.26.0, < 0.27",
|
102
101
|
"pytest-cov >= 6.1.1, < 6.2",
|
@@ -119,7 +118,6 @@ zzz-test-altair = [
|
|
119
118
|
"vl-convert-python >= 1.7.0, < 1.8",
|
120
119
|
"whenever >= 0.8.2, < 0.9",
|
121
120
|
]
|
122
|
-
zzz-test-astor = ["astor >= 0.8.1, < 0.9"]
|
123
121
|
zzz-test-asyncio = []
|
124
122
|
zzz-test-atomicwrites = ["atomicwrites >= 1.4.1, < 1.5"]
|
125
123
|
zzz-test-atools = [
|
@@ -174,7 +172,7 @@ zzz-test-hypothesis = [
|
|
174
172
|
"aiosqlite >= 0.21.0, < 0.22",
|
175
173
|
"asyncpg >= 0.30.0, < 0.31", # for sqlalchemy async
|
176
174
|
"greenlet >= 3.2.0, < 3.3", # for sqlalchemy async
|
177
|
-
"hypothesis >= 6.131.
|
175
|
+
"hypothesis >= 6.131.24, < 6.132",
|
178
176
|
"luigi >= 3.6.0, < 3.7",
|
179
177
|
"numpy >= 2.2.6, < 2.3",
|
180
178
|
"pathvalidate >= 3.2.3, < 3.3",
|
@@ -334,7 +332,7 @@ zzz-test-zoneinfo = [
|
|
334
332
|
# bump-my-version
|
335
333
|
[tool.bumpversion]
|
336
334
|
allow_dirty = true
|
337
|
-
current_version = "0.
|
335
|
+
current_version = "0.125.0"
|
338
336
|
|
339
337
|
[[tool.bumpversion.files]]
|
340
338
|
filename = "src/utilities/__init__.py"
|
@@ -445,7 +443,6 @@ filterwarnings = [
|
|
445
443
|
"ignore:Task .* without outputs has no custom complete.* method:UserWarning", # luigi
|
446
444
|
"ignore:There is no current event loop:DeprecationWarning", # eventkit
|
447
445
|
"ignore:Using fork.* can cause Polars to deadlock in the child process:RuntimeWarning", # polars/pqdm
|
448
|
-
"ignore:ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead:DeprecationWarning", # astor
|
449
446
|
"ignore:loop is closed:ResourceWarning", # redis
|
450
447
|
"ignore:unclosed <StreamWriter .*>:ResourceWarning", # redis
|
451
448
|
"ignore:unclosed <socket.*socket .*>:ResourceWarning", # redis
|
@@ -1,5 +1,6 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
+
from collections.abc import Iterator
|
3
4
|
from typing import TYPE_CHECKING, Any, ClassVar, TypeGuard
|
4
5
|
|
5
6
|
from pytest import mark, param, raises
|
@@ -24,17 +25,45 @@ class TestBucketMapping:
|
|
24
25
|
def test_main(self) -> None:
|
25
26
|
mapping = bucket_mapping(self.iterable, lambda x: x[0])
|
26
27
|
assert set(mapping) == {"a", "b", "c"}
|
28
|
+
for value in mapping.values():
|
29
|
+
assert isinstance(value, Iterator)
|
30
|
+
assert not isinstance(value, list)
|
27
31
|
assert list(mapping["a"]) == ["a1", "a2"]
|
28
32
|
assert list(mapping["b"]) == ["b1", "b2", "b3"]
|
29
33
|
assert list(mapping["c"]) == ["c1", "c2"]
|
30
34
|
|
35
|
+
def test_transform(self) -> None:
|
36
|
+
mapping = bucket_mapping(
|
37
|
+
self.iterable, lambda x: x[0], transform=lambda x: int(x[-1])
|
38
|
+
)
|
39
|
+
assert set(mapping) == {"a", "b", "c"}
|
40
|
+
for value in mapping.values():
|
41
|
+
assert isinstance(value, Iterator)
|
42
|
+
assert not isinstance(value, list)
|
43
|
+
assert list(mapping["a"]) == [1, 2]
|
44
|
+
assert list(mapping["b"]) == [1, 2, 3]
|
45
|
+
assert list(mapping["c"]) == [1, 2]
|
46
|
+
|
31
47
|
def test_list(self) -> None:
|
32
48
|
mapping = bucket_mapping(self.iterable, lambda x: x[0], list=True)
|
33
49
|
assert set(mapping) == {"a", "b", "c"}
|
50
|
+
for value in mapping.values():
|
51
|
+
assert isinstance(value, list)
|
34
52
|
assert mapping["a"] == ["a1", "a2"]
|
35
53
|
assert mapping["b"] == ["b1", "b2", "b3"]
|
36
54
|
assert mapping["c"] == ["c1", "c2"]
|
37
55
|
|
56
|
+
def test_transform_and_list(self) -> None:
|
57
|
+
mapping = bucket_mapping(
|
58
|
+
self.iterable, lambda x: x[0], transform=lambda x: int(x[-1]), list=True
|
59
|
+
)
|
60
|
+
assert set(mapping) == {"a", "b", "c"}
|
61
|
+
for value in mapping.values():
|
62
|
+
assert isinstance(value, list)
|
63
|
+
assert mapping["a"] == [1, 2]
|
64
|
+
assert mapping["b"] == [1, 2, 3]
|
65
|
+
assert mapping["c"] == [1, 2]
|
66
|
+
|
38
67
|
|
39
68
|
class TestPartitionList:
|
40
69
|
def test_main(self) -> None:
|
@@ -37,25 +37,81 @@ _U = TypeVar("_U")
|
|
37
37
|
|
38
38
|
@overload
|
39
39
|
def bucket_mapping(
|
40
|
-
iterable: Iterable[_T],
|
40
|
+
iterable: Iterable[_T],
|
41
|
+
func: Callable[[_T], THashable],
|
42
|
+
/,
|
43
|
+
*,
|
44
|
+
transform: Callable[[_T], _U],
|
45
|
+
list: Literal[True],
|
46
|
+
) -> Mapping[THashable, Sequence[_U]]: ...
|
47
|
+
@overload
|
48
|
+
def bucket_mapping(
|
49
|
+
iterable: Iterable[_T],
|
50
|
+
func: Callable[[_T], THashable],
|
51
|
+
/,
|
52
|
+
*,
|
53
|
+
transform: Callable[[_T], _U],
|
54
|
+
list: bool = False,
|
55
|
+
) -> Mapping[THashable, Iterator[_U]]: ...
|
56
|
+
@overload
|
57
|
+
def bucket_mapping(
|
58
|
+
iterable: Iterable[_T],
|
59
|
+
func: Callable[[_T], THashable],
|
60
|
+
/,
|
61
|
+
*,
|
62
|
+
transform: Callable[[_T], _U] | None = None,
|
63
|
+
list: Literal[True],
|
41
64
|
) -> Mapping[THashable, Sequence[_T]]: ...
|
42
65
|
@overload
|
43
66
|
def bucket_mapping(
|
44
|
-
iterable: Iterable[_T],
|
67
|
+
iterable: Iterable[_T],
|
68
|
+
func: Callable[[_T], THashable],
|
69
|
+
/,
|
70
|
+
*,
|
71
|
+
transform: Callable[[_T], _U] | None = None,
|
72
|
+
list: bool = False,
|
45
73
|
) -> Mapping[THashable, Iterator[_T]]: ...
|
74
|
+
@overload
|
75
|
+
def bucket_mapping(
|
76
|
+
iterable: Iterable[_T],
|
77
|
+
func: Callable[[_T], THashable],
|
78
|
+
/,
|
79
|
+
*,
|
80
|
+
transform: Callable[[_T], _U] | None = None,
|
81
|
+
list: bool = False,
|
82
|
+
) -> (
|
83
|
+
Mapping[THashable, Iterator[_T]]
|
84
|
+
| Mapping[THashable, Iterator[_U]]
|
85
|
+
| Mapping[THashable, Sequence[_T]]
|
86
|
+
| Mapping[THashable, Sequence[_U]]
|
87
|
+
): ...
|
46
88
|
def bucket_mapping(
|
47
89
|
iterable: Iterable[_T],
|
48
90
|
func: Callable[[_T], THashable],
|
49
91
|
/,
|
50
92
|
*,
|
93
|
+
transform: Callable[[_T], _U] | None = None,
|
51
94
|
list: bool = False, # noqa: A002
|
52
|
-
) ->
|
95
|
+
) -> (
|
96
|
+
Mapping[THashable, Iterator[_T]]
|
97
|
+
| Mapping[THashable, Iterator[_U]]
|
98
|
+
| Mapping[THashable, Sequence[_T]]
|
99
|
+
| Mapping[THashable, Sequence[_U]]
|
100
|
+
):
|
53
101
|
"""Bucket the values of iterable into a mapping."""
|
54
102
|
b = bucket(iterable, func)
|
55
103
|
mapping = {key: b[key] for key in b}
|
56
|
-
|
57
|
-
|
58
|
-
|
104
|
+
match transform, list:
|
105
|
+
case None, False:
|
106
|
+
return mapping
|
107
|
+
case None, True:
|
108
|
+
return {k: builtins.list(v) for k, v in mapping.items()}
|
109
|
+
case _, False:
|
110
|
+
return {k: map(transform, v) for k, v in mapping.items()}
|
111
|
+
case _, True:
|
112
|
+
return {k: builtins.list(map(transform, v)) for k, v in mapping.items()}
|
113
|
+
case _ as never:
|
114
|
+
assert_never(never)
|
59
115
|
|
60
116
|
|
61
117
|
##
|
@@ -1,33 +0,0 @@
|
|
1
|
-
from __future__ import annotations
|
2
|
-
|
3
|
-
from ast import Assign, Attribute, Call, Import, Load, Module, Name, alias
|
4
|
-
|
5
|
-
from utilities.astor import module_to_source
|
6
|
-
|
7
|
-
|
8
|
-
class TestModuleToSource:
|
9
|
-
def test_main(self) -> None:
|
10
|
-
import_dt = Import(names=[alias(name="datetime", asname="dt")])
|
11
|
-
assign = Assign(
|
12
|
-
targets=[Name(id="now")],
|
13
|
-
value=Call(
|
14
|
-
func=Attribute(
|
15
|
-
value=Attribute(value=Name(id="dt", ctx=Load()), attr="datetime"),
|
16
|
-
attr="now",
|
17
|
-
),
|
18
|
-
args=[],
|
19
|
-
keywords=[],
|
20
|
-
),
|
21
|
-
)
|
22
|
-
module = Module(body=[import_dt, assign], type_ignores=[])
|
23
|
-
result = module_to_source(module)
|
24
|
-
expected_with_ruff = """\
|
25
|
-
import datetime as dt
|
26
|
-
|
27
|
-
now = dt.datetime.now()
|
28
|
-
"""
|
29
|
-
expected_without_ruff = """\
|
30
|
-
import datetime as dt
|
31
|
-
now = dt.datetime.now()
|
32
|
-
"""
|
33
|
-
assert result in {expected_with_ruff, expected_without_ruff}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
from __future__ import annotations
|
2
|
-
|
3
|
-
from contextlib import suppress
|
4
|
-
from subprocess import CalledProcessError, check_call
|
5
|
-
from typing import TYPE_CHECKING
|
6
|
-
|
7
|
-
from astor import to_source
|
8
|
-
|
9
|
-
from utilities.tempfile import TemporaryDirectory
|
10
|
-
|
11
|
-
if TYPE_CHECKING:
|
12
|
-
from ast import Module
|
13
|
-
|
14
|
-
|
15
|
-
def module_to_source(module: Module, /) -> str:
|
16
|
-
"""Write a module as a `ruff`-formatted string."""
|
17
|
-
src = to_source(module)
|
18
|
-
with TemporaryDirectory() as temp:
|
19
|
-
path = temp.joinpath("temp.py")
|
20
|
-
with path.open(mode="w") as fh:
|
21
|
-
_ = fh.write(src)
|
22
|
-
with suppress(CalledProcessError, FileNotFoundError):
|
23
|
-
_ = check_call(["ruff", "format", str(path)])
|
24
|
-
with path.open() as fh:
|
25
|
-
return fh.read()
|
26
|
-
|
27
|
-
|
28
|
-
__all__ = ["module_to_source"]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_missing/__init__.py
RENAMED
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_missing/module.py
RENAMED
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_with/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_without/__init__.py
RENAMED
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_without/module_1.py
RENAMED
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/modules/package_without/module_2.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/__init__.py
RENAMED
File without changes
|
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/decorated_async.py
RENAMED
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/decorated_sync.py
RENAMED
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/error_bind.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/recursive.py
RENAMED
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/task_group_one.py
RENAMED
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/task_group_two.py
RENAMED
File without changes
|
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_traceback_funcs/untraced.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dycw_utilities-0.124.0 → dycw_utilities-0.125.0}/src/tests/test_typing_funcs/with_future.py
RENAMED
File without changes
|