FORMAT: enforce isinstance type checking
The pre-commits seem to have started failing due to a change in flake8. This MR fixes that.
We will be having an extended maintenance of https://git.ligo.org, https://containers.ligo.org, and https://docs.ligo.org on 7 May 2024 starting at approximately 9am PDT and lasting for three to four hours. This is to start the process of syncing the data from the current instance to the re-engineered instance we have been working with GitLab on over the past few months. Starting at approximately 9am GitLab will be put into maintenance mode, meaning that all services will be in read-only mode. Throughout the maintenance there may be several periods of downtime. Please address any comments, concerns or questions to the helpdesk.
The pre-commits seem to have started failing due to a change in flake8. This MR fixes that.