Replace assert statements
Asserts should be used to test conditions that should never happen. The purpose is to crash early in the case of a corrupt program state.
Exceptions should be used for errors that can conceivably happen, and you should almost always create your own Exception classes.
For example, if you're writing a function to read from a configuration file into a dict, improper formatting in the file should raise a ConfigurationSyntaxError, while you can assert that you're not about to return None.
In your example, if x is a value set via a user interface or from an external source, an exception is best.
If x is only set by your own code in the same program, go with an assertion.
This LGTM, I don't see any assert out of place, I would close this issue. All asserts I found were in the test suit where assert is ok.
Hmm, do you have a filter on your search directories by any chance? A quick skim of the search results in VS Code shows around 15+ instances of assert statements inside staircase/staircase.
ups yes, you are right.