Skip to content

Commit

Permalink
**Beartype 0.16.4** released.
Browse files Browse the repository at this point in the history
This patch release resolves all the bad things that have quietly gone
unnoticed by both man and Maine Coon alike – *until now.* Fellow
Ontarian and ML superstar @MaximilienLC (Maximilien Le Cleï)
<sup>*seriously, what is up with that "ï"</sup> quietly called our
attention to a bevy (pretty sure that means "alot") of outstanding
badness riddling the @beartype codebase.

This patch release resolves that badness. This means:

* **`beartype.claw` + methods + PEP 526.** Previously, `beartype.claw`
  silently failed to type-check PEP 526-compliant annotated variable
  assignments in methods. Now, `beartype.claw` does so: e.g.,

  ```python
  # In "{your_sagacious_package}.__init__":
  from beartype import beartype_this_package
  beartype_this_package()

  # In "{your_sagacious_package}...{your_bodacious_module}":
  class SoMuchClass(object):
      def so_much_method(self) -> None:
          # "beartype.claw" now raises an exception on this violation. Yah!
          so_much_local: int = 'You no longer fool @beartype, local."

          # "beartype.claw" also raises an exception on this violation. Go!
          self.so_much_var: int = 'You too are known to @beartype, variable."
  ```

* **@beartype 0.16.3 inheritance regression.** @beartype's prior stable
  release (i.e., @beartype 0.16.3) introduced a critical regression with
  respect to inheritance and type-checking. Notably, the `@beartype`
  decorator silently failed to type-check subclass methods overriding
  superclass methods under @beartype 0.16.3. Now, it does. I implore you
  all to believe that this never happened... Believe!

Much thanks to @MaximilienLC for his all-seeing eye, which sees all
@beartype's typing failures as plainly as I see the blinding glare off
my bald and malding head. (*Pretty itsy-bitsy nitty-gritty, innit?*)
  • Loading branch information
leycec committed Oct 21, 2023
1 parent 7525fa3 commit 58b1982
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 58b1982

Please sign in to comment.