Skip to content

typing: Make use of ParamSpec#578

Merged
jelmer merged 1 commit intotesting-cabal:masterfrom
stephenfin:typing
Mar 5, 2026
Merged

typing: Make use of ParamSpec#578
jelmer merged 1 commit intotesting-cabal:masterfrom
stephenfin:typing

Conversation

@stephenfin
Copy link
Contributor

So we can catch type issues like the below:

def foo(a: str, b: int | None = None):
    ...

class FooTest(testtools.TestCase):
    def test_foo(self):
        self.assertRaises(Exception, foo, 123, b='abc')

We don't currently have type checking enabled for the tests directory, but adding a test like the above proves this works.

So we can catch type issues like the below:

  def foo(a: str, b: int | None = None):
      ...

  class FooTest(testtools.TestCase):
      def test_foo(self):
          self.assertRaises(Exception, foo, 123, b='abc')

We don't currently have type checking enabled for the tests directory,
but adding a test like the above proves this works.

Signed-off-by: Stephen Finucane <stephen@that.guru>
@stephenfin
Copy link
Contributor Author

We don't currently have type checking enabled for the tests directory, but adding a test like the above proves this works.

I'm started working on a fix for this in #579 but, as noted there, it's going to take a while 😅

@jelmer jelmer merged commit 96b2036 into testing-cabal:master Mar 5, 2026
9 checks passed
@stephenfin stephenfin deleted the typing branch March 5, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants