Recent Releases of https://github.com/jorenham/optype

https://github.com/jorenham/optype - v0.13.4

What's Changed

optype.numpy

  • upgrade numpy-typing-compat to v20250818 in the numpy extra by @jorenham in https://github.com/jorenham/optype/pull/421
  • installation instructions for the conda optype-numpy package by @jorenham in https://github.com/jorenham/optype/pull/422 ### Other Changes
  • prepare for the next release by @jorenham in https://github.com/jorenham/optype/pull/419

Full Changelog: https://github.com/jorenham/optype/compare/v0.13.3...v0.13.4

- Python
Published by jorenham 6 months ago

https://github.com/jorenham/optype - v0.13.3

This patch release adds an upper version bound for numpy-typing-compat to prevent potential compatibility issues with future releases.

What's Changed

optype.numpy

  • set an upper version bound for numpy-typing-compat by @jorenham in https://github.com/jorenham/optype/pull/414
  • prepare for the new numpy-typing-compat versioning by @jorenham in https://github.com/jorenham/optype/pull/418 ### Other Changes
  • prepare for the 0.13.3 release by @jorenham in https://github.com/jorenham/optype/pull/416
  • improved project metadata by @jorenham in https://github.com/jorenham/optype/pull/417

Full Changelog: https://github.com/jorenham/optype/compare/v0.13.2...v0.13.3

- Python
Published by jorenham 6 months ago

https://github.com/jorenham/optype - v0.13.2

This is a bugfix release that addresses a permission issue in the built wheels that was caused by https://github.com/astral-sh/uv/issues/14920.

What's Changed

  • Bump the actions group with 3 updates by @dependabot[bot] in https://github.com/jorenham/optype/pull/409
  • Bump the actions group with 4 updates by @dependabot[bot] in https://github.com/jorenham/optype/pull/410
  • upgrade development and build dependencies by @jorenham in https://github.com/jorenham/optype/pull/412
  • bump astral-sh/setup-uv to 6.5.0 by @jorenham in https://github.com/jorenham/optype/pull/413

Full Changelog: https://github.com/jorenham/optype/compare/v0.13.1...v0.13.2

- Python
Published by jorenham 6 months ago

https://github.com/jorenham/optype - v0.13.1

What's Changed

optype.numpy

  • fix CanArrayStrict{1,2,3}D by @jorenham in https://github.com/jorenham/optype/pull/407

Full Changelog: https://github.com/jorenham/optype/compare/v0.13.0...v0.13.1

- Python
Published by jorenham 7 months ago

https://github.com/jorenham/optype - v0.13.0

[!IMPORTANT] To ensure static typing compatibility with the SPEC 0 NumPy versions, optype.numpy now requires numpy-typing-compat. It will automatically be installed with the optype[numpy] extra.

What's Changed

optype.numpy

  • robust numpy compat with numpy-typing-compat by @jorenham in https://github.com/jorenham/optype/pull/394
  • make AnyLongDouble* compatible with numpy<2.2 by @jorenham in https://github.com/jorenham/optype/pull/395
  • make Any[U]IntPDType compatible with numpy<2.2 by @jorenham in https://github.com/jorenham/optype/pull/396
  • fix older numpy compat issues with numpy-typing-compat by @jorenham in https://github.com/jorenham/optype/pull/399
  • include numpy==2.0.* in the testing matrix by @jorenham in https://github.com/jorenham/optype/pull/401
  • use np.ndarray instead of CanArray in To*Strict{1,2,3}D on numpy<2.1 by @jorenham in https://github.com/jorenham/optype/pull/400
  • warn on numpy-typing-compat / numpy version mismatch by @jorenham in https://github.com/jorenham/optype/pull/403
  • bump numpy-typing-compat to v20250730 by @jorenham in https://github.com/jorenham/optype/pull/404
  • error instead of warn in case of unsupported numpy-typing-compat by @jorenham in https://github.com/jorenham/optype/pull/405

Documentation

  • update the documented minimum support NumPy version by @jorenham in https://github.com/jorenham/optype/pull/397

Dependencies

  • bump development dependencies by @jorenham in https://github.com/jorenham/optype/pull/402

Other Changes

  • prepare for further development by @jorenham in https://github.com/jorenham/optype/pull/392

Full Changelog: https://github.com/jorenham/optype/compare/v0.12.2...v0.13.0

- Python
Published by jorenham 7 months ago

https://github.com/jorenham/optype - v0.12.2

What's Changed

  • Bundle the license file by @jorenham in https://github.com/jorenham/optype/pull/391

Full Changelog: https://github.com/jorenham/optype/compare/v0.12.1...v0.12.2

- Python
Published by jorenham 7 months ago

https://github.com/jorenham/optype - v0.12.1

What's Changed

optype.Can*

  • Can*Same[-T?, +R?] with -> Self | R by @jorenham in https://github.com/jorenham/optype/pull/379
  • CanI*Same inplace operator protocols by @jorenham in https://github.com/jorenham/optype/pull/381
  • generic Can*Self arithmetic unary operator protocols by @jorenham in https://github.com/jorenham/optype/pull/382
  • move the Can* tests to a more appropriate testing module @jorenham in https://github.com/jorenham/optype/pull/384

Documentation

  • fix typos and grammar issues in the docs by @jorenham in https://github.com/jorenham/optype/pull/389

Developer experience

  • formatting with dprint by @jorenham in https://github.com/jorenham/optype/pull/374
  • tox-uv & more tox envs by @jorenham in https://github.com/jorenham/optype/pull/375
  • use lefthook as git hooks manager by @jorenham in https://github.com/jorenham/optype/pull/377
  • ruff config cleanup by @jorenham in https://github.com/jorenham/optype/pull/376
  • instructions for copilot by @jorenham in https://github.com/jorenham/optype/pull/388

Dependencies

  • bump ruff to 0.12.4 by @jorenham in https://github.com/jorenham/optype/pull/370
  • preliminary support for python 3.14 by @jorenham in https://github.com/jorenham/optype/pull/385
  • explicit github action version tags by @jorenham in https://github.com/jorenham/optype/pull/386

Other Changes

  • move the type-tests in _core/_do.py to tests/do.py by @jorenham in https://github.com/jorenham/optype/pull/378
  • prepare for further development by @jorenham in https://github.com/jorenham/optype/pull/368
  • uv build backend by @jorenham in https://github.com/jorenham/optype/pull/387

Full Changelog: https://github.com/jorenham/optype/compare/v0.12.0...v0.12.1

- Python
Published by jorenham 7 months ago

https://github.com/jorenham/optype - v0.12.0

What's Changed

optype

  • Can*Self binop protocols by @jorenham in https://github.com/jorenham/optype/pull/348
  • Can binop return type param defaults to input param by @jorenham in https://github.com/jorenham/optype/pull/356
  • remove Just type-checker compatibility notice by @jorenham in https://github.com/jorenham/optype/pull/357
  • improved TypeVar naming scheme for the Can* protocols by @jorenham in https://github.com/jorenham/optype/pull/358
  • CanGetSelf[-T, +V] alias for CanGet[T, V, Self] by @jorenham in https://github.com/jorenham/optype/pull/359
  • Can*Same binop protocols by @jorenham in https://github.com/jorenham/optype/pull/362

optype.numpy

  • optype.numpy.Array* type alias docstring fixes by @jorenham in https://github.com/jorenham/optype/pull/353
  • [BREAKING] optype.numpy.CanArrayND: remove scalar type parameter default by @jorenham in https://github.com/jorenham/optype/pull/354
  • prepare for numpy 2.4 by @jorenham in https://github.com/jorenham/optype/pull/360
  • mypy's layered dependency blindness workaround by @jorenham in https://github.com/jorenham/optype/pull/361
  • optype.numpy.compat extended precision inexact types by @jorenham in https://github.com/jorenham/optype/pull/363
  • optype.numpy.To* array-like alias simplifications by @jorenham in https://github.com/jorenham/optype/pull/364
  • optype.numpy array-like types for float16, float32, and complex64 by @jorenham in https://github.com/jorenham/optype/pull/365
  • optype.numpy.ToJust[C]LongDouble* array-like type aliases by @jorenham in https://github.com/jorenham/optype/pull/366

Dependencies

  • bump mypy to 1.17.0 by @jorenham in https://github.com/jorenham/optype/pull/350
  • bump basedpyright to 1.30.1 by @jorenham in https://github.com/jorenham/optype/pull/351
  • bump ruff to 1.12.3 by @jorenham in https://github.com/jorenham/optype/pull/352
  • bump basedpyright to 1.31.0 by @jorenham in https://github.com/jorenham/optype/pull/367

Other Changes

  • prepare for further development by @jorenham in https://github.com/jorenham/optype/pull/347

Full Changelog: https://github.com/jorenham/optype/compare/v0.11.0...v0.12.0

- Python
Published by jorenham 7 months ago

https://github.com/jorenham/optype - v0.11.0

What's Changed

optype.numpy

  • NumPy 2.3.0 support, and two minor optype.numpy fixes on older numpy versions by @jorenham in https://github.com/jorenham/optype/pull/336
  • [BREAKING] optype.numpy.AnyFloat64DType without None by @jorenham in https://github.com/jorenham/optype/pull/346

Dependencies

  • mypy 1.16.0 by @jorenham in https://github.com/jorenham/optype/pull/334
  • Bump numpy from 2.3.0 to 2.3.1 in the actions group by @dependabot in https://github.com/jorenham/optype/pull/339
  • bump ruff to 0.12.2 by @jorenham in https://github.com/jorenham/optype/pull/341
  • bump mypy to 1.16.1 by @jorenham in https://github.com/jorenham/optype/pull/342
  • bump basedpyright to 1.30.0 (pyright 1.1.403) by @jorenham in https://github.com/jorenham/optype/pull/343
  • bump tox to 4.27.0 by @jorenham in https://github.com/jorenham/optype/pull/344
  • bump pytest to 8.4.1 by @jorenham in https://github.com/jorenham/optype/pull/345

Continuous integration

  • use github.ref instead of github.sha in the concurrency.group of CI by @jorenham in https://github.com/jorenham/optype/pull/337

Other Changes

  • prepare for further development by @jorenham in https://github.com/jorenham/optype/pull/333

Full Changelog: https://github.com/jorenham/optype/compare/v0.10.0...v0.11.0

- Python
Published by jorenham 8 months ago

https://github.com/jorenham/optype - v0.10.0

What's Changed

optype.numpy

  • prefer gradual type parameter defaults by @jorenham in https://github.com/jorenham/optype/pull/316
  • remove type parameters for individual numpy shape axes by @jorenham in https://github.com/jorenham/optype/pull/317
  • optionally gradual unbounded shape-types by @jorenham in https://github.com/jorenham/optype/pull/318
  • require numpy >= 1.25 by @jorenham in https://github.com/jorenham/optype/pull/320
  • stop using NBitBase in optype.numpy.compat by @jorenham in https://github.com/jorenham/optype/pull/326
  • ToJustInt64 numpy array-like aliases for int64 by @jorenham in https://github.com/jorenham/optype/pull/328
  • numpy version agnostic gradual shape type defaults by @jorenham in https://github.com/jorenham/optype/pull/329
  • numpy scalar type parameter gradual defaults by @jorenham in https://github.com/jorenham/optype/pull/330
  • numpy.CanArrayFunction contravariance assignability fix by @jorenham in https://github.com/jorenham/optype/pull/331
  • optype.numpy.SequenceND compatibility with numpy by @jorenham in https://github.com/jorenham/optype/pull/332

Dependencies

  • bump ruff to 0.11.4 by @jorenham in https://github.com/jorenham/optype/pull/310
  • update development dependencies by @jorenham in https://github.com/jorenham/optype/pull/312
  • bump development dependencies by @jorenham in https://github.com/jorenham/optype/pull/313
  • bump basedpyright to 1.29.2 (pyright 1.1.401) by @jorenham in https://github.com/jorenham/optype/pull/321
  • require python >= 3.11 by @jorenham in https://github.com/jorenham/optype/pull/322
  • bump ruff to 0.11.11 by @jorenham in https://github.com/jorenham/optype/pull/327

Continuous integration

  • read-only ci permissions by @jorenham in https://github.com/jorenham/optype/pull/323
  • bump scientific-python/repo-review to v0.12.2 by @jorenham in https://github.com/jorenham/optype/pull/324
  • fix dependabot config by @jorenham in https://github.com/jorenham/optype/pull/325

Other Changes

  • prepare for next release by @jorenham in https://github.com/jorenham/optype/pull/309
  • bump astral-sh/setup-uv to v6 by @jorenham in https://github.com/jorenham/optype/pull/311
  • prepare for the optype 0.10.0 release by @jorenham in https://github.com/jorenham/optype/pull/319

Full Changelog: https://github.com/jorenham/optype/compare/v0.9.3...v0.10.0

- Python
Published by jorenham 9 months ago

https://github.com/jorenham/optype - v0.9.3

This bugfix release addresses an issue where the 2- and 3-d optype.numpy array-like type aliases were not assignable to their *ND variants, e.g.:

```py import numpy as np import optype.numpy as onp

def fn(x: onp.ToFloatND) -> int: return np.asarray(x).size

def f2(x: onp.ToFloat2D) -> int: return fn(x) # will no longer be rejected ```

This additionally works around an issue in typing_extensions==4.13.0 that results in a TypeError being raised when taking the union of typing.TypeAliasType and typing_extension.TypeAliasType on (at least) Python 3.12.

What's Changed

optype.numpy

  • update development dependencies, and more flexible pyright config by @jorenham in https://github.com/jorenham/optype/pull/307
  • fix To{}(2|3)D not being assignable to To{}ND by @jorenham in https://github.com/jorenham/optype/pull/308 ### Other Changes
  • prepare for next release by @jorenham in https://github.com/jorenham/optype/pull/304
  • bump ruff to 0.11.0 by @jorenham in https://github.com/jorenham/optype/pull/305

Full Changelog: https://github.com/jorenham/optype/compare/v0.9.2...v0.9.3

- Python
Published by jorenham 11 months ago

https://github.com/jorenham/optype - v0.9.2

What's Changed

optype

  • mark optype.Just* as @final and simplify metaclasses by @jorenham in https://github.com/jorenham/optype/pull/299
  • add optype.JustDate by @jorenham in https://github.com/jorenham/optype/pull/300

optype.numpy

  • numpy>=2.2 fixes for array- and dtype-likes by @jorenham in https://github.com/jorenham/optype/pull/301
  • new optype.numpy.random submodule by @jorenham in https://github.com/jorenham/optype/pull/302
  • common numpy literal types by @jorenham in https://github.com/jorenham/optype/pull/303

Dependencies

  • update the dev deps by @jorenham in https://github.com/jorenham/optype/pull/291
  • bump numpy to 2.2.3 by @jorenham in https://github.com/jorenham/optype/pull/292
  • remove pre-commit by @jorenham in https://github.com/jorenham/optype/pull/296
  • update development dependencies by @jorenham in https://github.com/jorenham/optype/pull/297
  • bump basedmypy to 2.10.0 by @jorenham in https://github.com/jorenham/optype/pull/298

Other Changes

  • prepare for v0.9.2 by @jorenham in https://github.com/jorenham/optype/pull/289

Full Changelog: https://github.com/jorenham/optype/compare/v0.9.1...v0.9.2

- Python
Published by jorenham 12 months ago

https://github.com/jorenham/optype - v0.9.1

What's Changed

optype.numpy

  • fix longdouble dtype name literal by @jorenham in https://github.com/jorenham/optype/pull/283
  • remove float80 and complex160 from [c]longdouble by @jorenham in https://github.com/jorenham/optype/pull/285
  • add onp.NDim0, which, unlike NDim, excludes 0 by @jorenham in https://github.com/jorenham/optype/pull/286
  • add literal onp.To[Just]{False,True} aliases by @jorenham in https://github.com/jorenham/optype/pull/287
  • generic onp.ToArrayStrict{1,2,3}D by @jorenham in https://github.com/jorenham/optype/pull/288

Dependencies

  • Update the development dependencies by @jorenham in https://github.com/jorenham/optype/pull/281
  • bump ruff to 0.9.4 by @jorenham in https://github.com/jorenham/optype/pull/284

Other Changes

  • prepare for v0.9.1 by @jorenham in https://github.com/jorenham/optype/pull/277

Full Changelog: https://github.com/jorenham/optype/compare/v0.9.0...v0.9.1

- Python
Published by jorenham about 1 year ago

https://github.com/jorenham/optype - v0.9.0

Highlights

  • ⚡ Faster import optype as op by deferring submodule imports (https://github.com/jorenham/optype/pull/251)
  • ✨ New op.io submodule (docs) (https://github.com/jorenham/optype/pull/253)
  • ✨ New and improved op.Just types (docs):
    • Just[T] - Accepts _: T iff. type(_) is T.
    • JustInt - Accepts _: int and literal ints, rejects e.g. _: bool
    • JustFloat - Accepts _: float, rejects e.g. _: int and _: numpy.float64
    • JustComplex - Accepts _: complex, rejects _: float and _: numpy.complex128
    • JustBytes - Accepts _: bytes and bytes-literals, rejects _: bytearray, _: memoryview, and _: numpy.bytes_
    • JustObject - Accepts _: object, rejects everything else. Useful for annotating sentinels like DEFAULT = object().
  • ✨ New op.numpy.is_array_{0,1,2,3,n}d typeguards (docs) (https://github.com/jorenham/optype/pull/270)

Deprecations

  • The op.typing.Just* types are deprecated in favor of op.Just*.

What's Changed

optype

  • generic optype.HasClass: suprisingly useful! by @jorenham in https://github.com/jorenham/optype/pull/257
  • move Just* from optype.typing to optype and deprecate by @jorenham in https://github.com/jorenham/optype/pull/258
  • custom runtime-checkable Just* types by @jorenham in https://github.com/jorenham/optype/pull/260
  • Just without redundant typing hacks by @jorenham in https://github.com/jorenham/optype/pull/261
  • add JustObject by @jorenham in https://github.com/jorenham/optype/pull/264
  • add JustBytes by @jorenham in https://github.com/jorenham/optype/pull/265
  • change HasFunc and HasWrapped generic type params by @jorenham in https://github.com/jorenham/optype/pull/267
  • change HasTypeParams type params by @jorenham in https://github.com/jorenham/optype/pull/268

optype.numpy

  • prefer Just{Float,Complex} over Just[{float,complex}] in optype.numpy by @jorenham in https://github.com/jorenham/optype/pull/240
  • add the missing Just types to onp.Any*DType by @jorenham in https://github.com/jorenham/optype/pull/243
  • optype.numpy.is_ typeguard by @jorenham in https://github.com/jorenham/optype/pull/270
  • split the private op.numpy._any_dtype module into two by @jorenham in https://github.com/jorenham/optype/pull/275
  • new optype.numpy.ToDType alias by @jorenham in https://github.com/jorenham/optype/pull/276

Dependencies

  • ruff 0.9.1, basedpyright 1.23.2, basedmypy 2.9.1 by @jorenham in https://github.com/jorenham/optype/pull/239
  • bump basedpyright to 1.24.0 by @jorenham in https://github.com/jorenham/optype/pull/255
  • bump ruff to 0.9.2 by @jorenham in https://github.com/jorenham/optype/pull/259
  • bump numpy to 2.2.2 (dev-only) by @jorenham in https://github.com/jorenham/optype/pull/263
  • bump pre-commit to 4.1.0 by @jorenham in https://github.com/jorenham/optype/pull/271

Continuous integration

  • trigger the build & publish workflow on (pre)release by @jorenham in https://github.com/jorenham/optype/pull/238
  • automatically label PR's by @jorenham in https://github.com/jorenham/optype/pull/247
  • add CODEOWNERS by @jorenham in https://github.com/jorenham/optype/pull/248

Other Changes

  • more consistent style for imports and exports by @jorenham in https://github.com/jorenham/optype/pull/246
  • lazy submodule imports by @jorenham in https://github.com/jorenham/optype/pull/251
  • optype.io by @jorenham in https://github.com/jorenham/optype/pull/253
  • stop using __future__.annotations and typing.TYPE_CHECKING by @jorenham in https://github.com/jorenham/optype/pull/256
  • cleaner ruff.lint.isort config by @jorenham in https://github.com/jorenham/optype/pull/262
  • cleaner private module structure by @jorenham in https://github.com/jorenham/optype/pull/266
  • format pyproject.toml by @jorenham in https://github.com/jorenham/optype/pull/269
  • update the auto-release changelog config by @jorenham in https://github.com/jorenham/optype/pull/272
  • globally ignore common inline typechecker ignores by @jorenham in https://github.com/jorenham/optype/pull/273

Full Changelog: https://github.com/jorenham/optype/compare/v0.8.0...v0.9.0

- Python
Published by jorenham about 1 year ago

https://github.com/jorenham/optype - v0.8.0

What's Changed

optype.numpy

  • accept more valid numpy array-likes in optype.numpy.To*{1,2,3,N} by @jorenham in https://github.com/jorenham/optype/pull/214
  • onp.Any[U]Int{DType,Array} for np.int_ by @jorenham in https://github.com/jorenham/optype/pull/224
  • include opt.Just[{int,float,complex}] in onp.Any{Int,Float,Complex}{Array,DType} by @jorenham in https://github.com/jorenham/optype/pull/225
  • new onp.compat module, and Any as shape-type default on numpy<2.1 by @jorenham in https://github.com/jorenham/optype/pull/226
  • new onp.Matrix and onp.MArray[{0,1,2,3}D] aliases by @jorenham in https://github.com/jorenham/optype/pull/228
  • onp.AnyBytes8DType for np.dtype("c") by @jorenham in https://github.com/jorenham/optype/pull/230
  • new onp.ToJust{Bool,Float,Complex} aliases by @jorenham in https://github.com/jorenham/optype/pull/231
  • new onp.To[Just]{Float64,Complex128}* aliases by @jorenham in https://github.com/jorenham/optype/pull/232 ### optype.pickle
  • Added missed optype documentation by @kam193 in https://github.com/jorenham/optype/pull/212 ### optype.typing
  • add JustFloat and JustComplex to optype.typing by @jorenham in https://github.com/jorenham/optype/pull/215 ### Dependencies
  • migrate from codespell to typos by @jorenham in https://github.com/jorenham/optype/pull/213
  • bump basedmypy to 2.8.0 and basedpyright to 1.22.1 by @jorenham in https://github.com/jorenham/optype/pull/218
  • update development dependencies by @jorenham in https://github.com/jorenham/optype/pull/223 ### Continuous integration
  • test & typecheck all of the supported numpy versions by @jorenham in https://github.com/jorenham/optype/pull/227
  • PyPI trusted publishing by @jorenham in https://github.com/jorenham/optype/pull/234 ### Other Changes
  • update the security policy by @jorenham in https://github.com/jorenham/optype/pull/216
  • automatically generated release notes configuration by @jorenham in https://github.com/jorenham/optype/pull/233

New Contributors

  • @kam193 made their first contribution in https://github.com/jorenham/optype/pull/212

Full Changelog: https://github.com/jorenham/optype/compare/v0.7.3...v0.8.0

- Python
Published by jorenham about 1 year ago

https://github.com/jorenham/optype - v0.7.3

Highlights

  • optype is now on conda-forge, thanks to @lucascolley (docs)
  • [optype.numpy] The CanArrayND type now optionally accepts a second shape-type argument (docs)
  • [optype.numpy] New Array0D and CanArray0D aliases for 0-dimensional numpy arrays (not scalars) (docs)
  • [optype.numpy] New To*Strict{1,2,3}D array-like types with "strict" shape, useful for non-overlapping shape-type overloads (docs)

Fixes

  • Fix ImportError on python >= 3.13 without typing_extensions installed

What's Changed

  • fix license metadata by @jorenham in https://github.com/jorenham/optype/pull/202
  • bump ruff to 0.8.1 by @jorenham in https://github.com/jorenham/optype/pull/203
  • Conda installation instructions by @jorenham in https://github.com/jorenham/optype/pull/204
  • fix typing_extensions import on python>=3.13 by @jorenham in https://github.com/jorenham/optype/pull/205
  • optional onp.CanArrayND shape-type param, improved shape-type compatibility by @jorenham in https://github.com/jorenham/optype/pull/206
  • onp.To*Strict{1,2,3}D: array-like aliases with strict shape-type by @jorenham in https://github.com/jorenham/optype/pull/207
  • fix (more) typing_extensions imports on python>=3.13 by @jorenham in https://github.com/jorenham/optype/pull/208
  • 0-d numpy array aliases by @jorenham in https://github.com/jorenham/optype/pull/209

Full Changelog: https://github.com/jorenham/optype/compare/v0.7.2...v0.7.3

- Python
Published by jorenham about 1 year ago

https://github.com/jorenham/optype - v0.7.2

Highlights

  • optype.numpy.To*3D - Array-like aliases for 3-D array-likes (docs)
  • optype.numpy.ToJustInt* - Scalar- and array-like aliases for just integer array-likes, i.e. bool and np.bool_ will be rejected (docs)

Fixes

  • #194 - workaround for a mypy bug with recursive sequences types

What's Changed

  • ruff 0.8.0 and basedpyright 1.22.0 by @jorenham in https://github.com/jorenham/optype/pull/195
  • workaround for a mypy bug with recursive sequences types by @jorenham in https://github.com/jorenham/optype/pull/196
  • export SequenceND from optype.numpy by @jorenham in https://github.com/jorenham/optype/pull/197
  • 3-d aliases for arrays and array-likes in optype.numpy by @jorenham in https://github.com/jorenham/optype/pull/198
  • ToJustInt scalar- and array-likes in optype.numpy by @jorenham in https://github.com/jorenham/optype/pull/199

Full Changelog: https://github.com/jorenham/optype/compare/v0.7.1...v0.7.2

- Python
Published by jorenham about 1 year ago

https://github.com/jorenham/optype - v0.7.1

What's Changed

  • fix onp.ToArray{1,2}D names by @jorenham in https://github.com/jorenham/optype/pull/193

Full Changelog: https://github.com/jorenham/optype/compare/v0.7.0...v0.7.1

- Python
Published by jorenham over 1 year ago

https://github.com/jorenham/optype - v0.7.0

Highlights

  • [BREAKING] The optype.numpy.Any* aliases no longer accept bare scalars types
  • Coercible scalar- and array-like type aliases optype.numpy.Array{1,2,3,N}D (docs)
  • The new optype.dlpack module with DLPack types and enums (docs)
  • Improved the readability of the optype.numpy types
  • Experimental Just and JustInt in optype.typing (docs)

What's Changed

  • development dependency updates by @jorenham in https://github.com/jorenham/optype/pull/160
  • native toml tox config by @jorenham in https://github.com/jorenham/optype/pull/161
  • switch from poetry to uv by @jorenham in https://github.com/jorenham/optype/pull/162
  • switch from single to double quotes for black compatibility by @jorenham in https://github.com/jorenham/optype/pull/163
  • enforce ruff format by @jorenham in https://github.com/jorenham/optype/pull/164
  • clean up the internal module structure by @jorenham in https://github.com/jorenham/optype/pull/165
  • update pre-commit hooks by @pre-commit-ci in https://github.com/jorenham/optype/pull/166
  • update development dependencies by @jorenham in https://github.com/jorenham/optype/pull/168
  • optype.dlpack: DLPack types and enums by @jorenham in https://github.com/jorenham/optype/pull/169
  • optype.array_api - dtypes by @jorenham in https://github.com/jorenham/optype/pull/170
  • Revert "optype.array_api - dtypes" by @jorenham in https://github.com/jorenham/optype/pull/176
  • PEP 735 dependency groups, and fixed mypy config by @jorenham in https://github.com/jorenham/optype/pull/177
  • fix optype.numpy.CanArray by @jorenham in https://github.com/jorenham/optype/pull/178
  • optype.types.Deprecated by @jorenham in https://github.com/jorenham/optype/pull/179
  • simplified optype.numpy dtypes by @jorenham in https://github.com/jorenham/optype/pull/182
  • fix and improve the optype.numpy.Any* docs by @jorenham in https://github.com/jorenham/optype/pull/183
  • improve readability of optype.numpy type aliases and protocols by @jorenham in https://github.com/jorenham/optype/pull/184
  • optype.numpy.Array{1,2,3,N}D aliases by @jorenham in https://github.com/jorenham/optype/pull/185
  • workaround a PEP 696 bug in typing_extensions.Protocol affecting CanSequence by @jorenham in https://github.com/jorenham/optype/pull/186
  • add SPEC 0 badge by @jorenham in https://github.com/jorenham/optype/pull/187
  • bump basedpyright to 1.21.1 (pyright 1.1.389) by @jorenham in https://github.com/jorenham/optype/pull/188
  • bump ruff to 0.7.4 by @jorenham in https://github.com/jorenham/optype/pull/189
  • experimental Just and JustInt types in optype.typing by @jorenham in https://github.com/jorenham/optype/pull/191
  • optype.numpy.To* coercible scalar- and array-likes by @jorenham in https://github.com/jorenham/optype/pull/192

New Contributors

  • @pre-commit-ci made their first contribution in https://github.com/jorenham/optype/pull/166

Full Changelog: https://github.com/jorenham/optype/compare/v0.6.1...v0.7.0

- Python
Published by jorenham over 1 year ago

https://github.com/jorenham/optype - v0.6.1

This is a bugfix release with no breaking changes. However, because optype now uses less typing.Any, which could cause type-checkers to report errors that were previously hidden.

Highlights

  • Stricter type-checking with basedmypy.
  • Removed almost all typing.Any uses. See https://github.com/numpy/numpy/pull/27211 for why Any is evil.
  • Fixed several typing errors with numpy 2.1.

What's Changed

  • Farewell git-flow by @jorenham in https://github.com/jorenham/optype/pull/151
  • Add security policy by @jorenham in https://github.com/jorenham/optype/pull/152
  • Add a sponsor button by @jorenham in https://github.com/jorenham/optype/pull/153
  • basedmypy by @jorenham in https://github.com/jorenham/optype/pull/154
  • Bump NumPy to 2.1.0 by @jorenham in https://github.com/jorenham/optype/pull/155
  • basedmypy badge by @jorenham in https://github.com/jorenham/optype/pull/156
  • optype 0.6.1 by @jorenham in https://github.com/jorenham/optype/pull/157

Full Changelog: https://github.com/jorenham/optype/compare/v0.6.0...v0.6.1

- Python
Published by jorenham over 1 year ago

https://github.com/jorenham/optype - v0.6.0

Highlights

Breaking changes

  • Increased the minimum Python version from 3.10.0 to 3.10.1
  • Increased the minimum typing_extensions version from 4.7 to 4.8
  • Moved CanCopy, CanDeepcopy and CanReplace from optype._ to optype.copy._
  • Moved HasDataclassFields from optype._ to optype.dataclasses._
  • Moved CanGetnewargs[Ex], CanReduce[Ex], and Can{Get,Set}state from optype._ to optype.pickle._
  • Any*Array and Any*DType for int_, float64 and complex128 don't include int, float, and complex anymore. See https://github.com/numpy/numpy/issues/27032#issuecomment-2249308801 for why this was done.

Full Changelog: https://github.com/jorenham/optype/compare/v0.5.0...v0.6.0

- Python
Published by jorenham over 1 year ago

https://github.com/jorenham/optype - v0.5.0

Release highlights

  • optype.numpy: (optional) NumPy (1 & 2) typing protocols and aliases, see the docs the details
  • Implement PEP 696 type parameter defaults
  • *Self aliases for the context manager Can* interfaces
  • *Self aliases for the inplace operand CanI* interfaces
  • Many documentation fixes & improvements
  • Simplified local development using Tox

Breaking changes

  • typing_extensions is now required for all Python versions <3.13

What's Changed

  • bump basedpyright to 1.10.2 by @jorenham in https://github.com/jorenham/optype/pull/49
  • bump ruff to 0.4.0 by @jorenham in https://github.com/jorenham/optype/pull/50
  • bump basedpyright to 1.10.3 by @jorenham in https://github.com/jorenham/optype/pull/51
  • bump ruff to 0.4.1 by @jorenham in https://github.com/jorenham/optype/pull/52
  • use repo-review and tox by @jorenham in https://github.com/jorenham/optype/pull/53
  • Fix example code formatting issues in README.md by @jorenham in https://github.com/jorenham/optype/pull/54
  • Bump ruff from 0.4.1 to 0.4.2 by @dependabot in https://github.com/jorenham/optype/pull/56
  • Bump basedpyright from 1.10.3 to 1.10.4 by @dependabot in https://github.com/jorenham/optype/pull/57
  • Bump sp-repo-review from 2024.3.10 to 2024.4.23 by @dependabot in https://github.com/jorenham/optype/pull/58
  • Bump pytest from 8.1.1 to 8.2.0 by @dependabot in https://github.com/jorenham/optype/pull/59
  • Bump tox from 4.14.2 to 4.15.0 by @dependabot in https://github.com/jorenham/optype/pull/60
  • Update development dependencies by @jorenham in https://github.com/jorenham/optype/pull/77
  • Bump basedpyright to 1.12.6 by @jorenham in https://github.com/jorenham/optype/pull/79
  • Improved pre-commit & markdownlint config by @jorenham in https://github.com/jorenham/optype/pull/80
  • Use pre-commit within tox by @jorenham in https://github.com/jorenham/optype/pull/81
  • Bump scientific-python/repo-review from 0.10.6 to 0.11.0 by @dependabot in https://github.com/jorenham/optype/pull/63
  • Defaults for generic type parameters by @jorenham in https://github.com/jorenham/optype/pull/78
  • Add *Self aliases for the augmented binop CanI* interfaces by @jorenham in https://github.com/jorenham/optype/pull/82
  • Add missing overloads to DoesI* inplace binary operator callable protocols by @jorenham in https://github.com/jorenham/optype/pull/83
  • Bump ruff to 0.4.9 by @jorenham in https://github.com/jorenham/optype/pull/84
  • *Self aliases for the unary arithmetic operand interfaces by @jorenham in https://github.com/jorenham/optype/pull/85
  • add *Self aliases for context manager interfaces by @jorenham in https://github.com/jorenham/optype/pull/86
  • Prefer typing_extensions imports for Protocol and runtime_checkable by @jorenham in https://github.com/jorenham/optype/pull/87
  • Test using beartype by @jorenham in https://github.com/jorenham/optype/pull/88
  • bump basedpyright to 1.13.0 by @jorenham in https://github.com/jorenham/optype/pull/91
  • optype.numpy: interfaces and type-aliases for numpy by @jorenham in https://github.com/jorenham/optype/pull/55
  • Use the new basedpyright pre-commit hook by @jorenham in https://github.com/jorenham/optype/pull/92
  • Bump ruff to 0.4.10 by @jorenham in https://github.com/jorenham/optype/pull/93
  • Add the optype.inspect module by @jorenham in https://github.com/jorenham/optype/pull/94

Full Changelog: https://github.com/jorenham/optype/compare/v0.4.0...v0.5.0

- Python
Published by jorenham over 1 year ago

https://github.com/jorenham/optype - v0.4.0

The minimum required Python version has been lowered from 3.12 to 3.10.

What's Changed

  • Bump basedpyright to 1.10.0 by @jorenham in https://github.com/jorenham/optype/pull/41
  • basedpyright badge by @jorenham in https://github.com/jorenham/optype/pull/42
  • bump ruff to 0.3.7 and basedpyright to 1.10.1 by @jorenham in https://github.com/jorenham/optype/pull/43
  • Add pypi classifiers and project urls by @jorenham in https://github.com/jorenham/optype/pull/44
  • Add CONTRIBUTING.md and CODE_OF_CONDUCT.md by @jorenham in https://github.com/jorenham/optype/pull/45
  • Run markdownlint in the CI workflow by @jorenham in https://github.com/jorenham/optype/pull/46
  • Support for Python 3.11 and 3.13 by @jorenham in https://github.com/jorenham/optype/pull/47
  • Support for Python 3.10 by @jorenham in https://github.com/jorenham/optype/pull/48

Full Changelog: https://github.com/jorenham/optype/compare/v0.3.1...v0.4.0

- Python
Published by jorenham almost 2 years ago

https://github.com/jorenham/optype - v0.3.1

What's Changed

  • Update pyright and pre-commit by @jorenham in https://github.com/jorenham/optype/pull/34
  • Switch from pyright to basedpyright by @jorenham in https://github.com/jorenham/optype/pull/35
  • Introductory usage example by @jorenham in https://github.com/jorenham/optype/pull/38
  • Bump ruff from 0.3.4 to 0.3.5 by @dependabot in https://github.com/jorenham/optype/pull/37
  • Post ruff upgrade tweaks by @jorenham in https://github.com/jorenham/optype/pull/39

Full Changelog: https://github.com/jorenham/optype/compare/v0.3.0...v0.3.1

- Python
Published by jorenham almost 2 years ago

https://github.com/jorenham/optype - v0.3.0

What's Changed

  • Fix CanAIterSelf not being an AsyncGenerator subtype by @jorenham in https://github.com/jorenham/optype/pull/17
  • upgrade pyright to 1.1.355 by @jorenham in https://github.com/jorenham/optype/pull/18
  • several doc fixes and improvements by @jorenham in https://github.com/jorenham/optype/pull/27
  • add ops for __reversed__ and __missing__ by @jorenham in https://github.com/jorenham/optype/pull/28
    • CanSequence[I: CanIndex, V] (combines CanLen and CanGetitem[I, V])
    • do_reversed: DoesReversed (type-corrected alias for builtins.reversed)
    • do_missing: DoesMissing (calls .__missing__())
  • Interfaces for the copy standard library by @jorenham in https://github.com/jorenham/optype/pull/29
    • CanCopy[T] and CanCopySelf
    • CanDeepcopy[T] and CanDeepcopySelf
    • CanReplace[T, V] and CanReplaceSelf[V]
  • Interfaces for the pickle standard library by @jorenham in https://github.com/jorenham/optype/pull/30
    • CanReduce[R: str | tuple]
    • CanReduceEx[R: str | tuple]
    • CanGetState[S]
    • CanSetState[S]
    • CanGetnewargs[*Args]
    • CanGetnewargsEx[*Args, Kw]
  • upgrade to ruff 0.3.4 by @jorenham in https://github.com/jorenham/optype/pull/31
  • Interfaces for the dataclasses standard library by @jorenham in https://github.com/jorenham/optype/pull/32
    • HasDataclassFields

Full Changelog: https://github.com/jorenham/optype/compare/v0.2.2...v0.3.0

- Python
Published by jorenham almost 2 years ago

https://github.com/jorenham/optype - v0.2.2

What's Changed

  • fix incorrect optype.do_ne annotation by @jorenham in https://github.com/jorenham/optype/pull/10
  • fix incorrect optype.DoesIMod annotation by @jorenham in https://github.com/jorenham/optype/pull/11
  • upgrade to ruff 0.3.3 by @jorenham in https://github.com/jorenham/optype/pull/12
  • add docstrings for some Can* types by @jorenham in https://github.com/jorenham/optype/pull/13
  • add CanIterSelf[+V] and CanAIterSelf[+V] by @jorenham in https://github.com/jorenham/optype/pull/14
  • add typed ops for __len__ and __length_hint__ by @jorenham in https://github.com/jorenham/optype/pull/15

Full Changelog: https://github.com/jorenham/optype/compare/v0.2.1...v0.2.2

- Python
Published by jorenham almost 2 years ago

https://github.com/jorenham/optype - v0.2.1

What's Changed

  • Bump pytest from 8.0.2 to 8.1.1 by @dependabot in https://github.com/jorenham/optype/pull/5
  • Bump pyright to 1.1.354 by @jorenham in https://github.com/jorenham/optype/pull/6
  • Configure markdownlint by @jorenham in https://github.com/jorenham/optype/pull/7
  • Builtin type constructor operators by @jorenham in https://github.com/jorenham/optype/pull/8
    • do_bool: DoesBool
    • do_int: DoesInt
    • do_float: DoesFloat
    • do_complex: DoesComplex
    • do_bytes: DoesBytes
    • do_str: DoesStr
  • Examples & integration tests by @jorenham in https://github.com/jorenham/optype/pull/9

New Contributors

  • @dependabot made their first contribution in https://github.com/jorenham/optype/pull/5

Full Changelog: https://github.com/jorenham/optype/compare/v0.2.0...v0.2.1

- Python
Published by jorenham almost 2 years ago

https://github.com/jorenham/optype - v0.2.0

What's Changed

  • add 72 operators as optype.do_*, so that optype > operator
  • add callback protocols for the 72 operators as optype.Does*
  • Many documentation improvements
  • [BREAKING] renamed the async CanA{name} types as CanA{Name}, improving readability
  • Fixed several minor typing issues
  • Improved code quality of the tests
  • Streamlined the CI workflow
  • Upgrade ruff to 0.3.2, and tightened some rules
  • Upgrade pyright to 1.1.353

Full Changelog: https://github.com/jorenham/optype/compare/v0.1.0...v0.2.0

- Python
Published by jorenham almost 2 years ago

https://github.com/jorenham/optype - v0.1.0

The official first release of optype 🎉.

What's Changed

  • Everything 🎉

New Contributors

  • @jorenham made their first contribution in https://github.com/jorenham/optype/pull/1

Full Changelog: https://github.com/jorenham/optype/commits/v0.1.0

- Python
Published by jorenham almost 2 years ago