Testcase module typed and formatted.

- Type hints for testcase module are completed.
- Type comments (to be compatible with Python 2) have been added to
  other parts of slapos.core only when necessary to achieve full type
  checking in the testcase module, with Pyright in strict mode.
- Docstrings added/completed for the testcase module.
- Source is formatted with ruff.

See merge request !693
21 jobs for master in 0 seconds
Status Job ID Name Coverage
  External
failed SlapOS-Master.UnitTest-Master

03:53:44

passed SlapOS.Eggs.UnitTest-Master.Python2

01:09:11

passed SlapOS.Eggs.UnitTest-Master.Python3

02:05:03

passed SlapOS-Master.UnitTest-Master

02:11:47

passed SlapOS-Master.UnitTest-Master

02:32:05

passed SlapOS-Master.UnitTest-Master

02:15:12

failed SlapOS-Master.UnitTest-Master

02:40:27

failed SlapOS.Eggs.UnitTest-Master.Python2

00:24:53

passed SlapOS.Eggs.UnitTest-Master.Python2

00:37:04

failed SlapOS.Eggs.UnitTest-Master.Python2

00:24:54

passed SlapOS.Eggs.UnitTest-Master.Python2

00:38:10

failed SlapOS.Eggs.UnitTest-Master.Python2

00:27:38

passed SlapOS.Eggs.UnitTest-Master.Python2

00:25:32

passed SlapOS.Eggs.UnitTest-Master.Python2

00:35:05

passed SlapOS.Eggs.UnitTest-Master.Python3

00:39:07

failed SlapOS.Eggs.UnitTest-Master.Python3

00:32:24

passed SlapOS.Eggs.UnitTest-Master.Python3

00:30:29

failed SlapOS.Eggs.UnitTest-Master.Python3

00:25:48

failed SlapOS.Eggs.UnitTest-Master.Python3

00:25:20

passed SlapOS.Eggs.UnitTest-Master.Python3

00:42:06

passed SlapOS.Eggs.UnitTest-Master.Python3

00:39:51