Ruff fixes (various message classes per commit) - #63
Conversation
ensure that both lists are of equal length and error if not.
-- We silence S608 about forming SQL queries using user inputs;
-- We now use Python logging instead of calling print();
-- Avoid implicit Optional typing, ie. prefer:
varname: list[str] | None = None
over:
varname: list[str] = None
|
Hey Ben - thanks for this! I think mostly fine. One small bug in the error msg generation in the The introduction of the logging seems slightly more than just linting / style changes (at least imho?). I do agree that the print statements aren't great (and were supposed to be temporary) - and using proper logging is a good, but I do wonder if it maybe should be more deliberately introduced - (probably set it up differently across the library?) Not a strongly held view - but perhaps could be a separate PR / issues. |
Yep, OK, fair enough. I'll make that a separate change. |
| msg = f"Cannot strip {strip_levels} levels from path with only " | ||
| f"{len(path_parts)} parts: {url_path}" | ||
| raise ValueError(msg) |
There was a problem hiding this comment.
Second half of this error msg lost (just need to add a parenthesis I think)
| msg = f"Cannot strip {strip_levels} levels from path with only " | |
| f"{len(path_parts)} parts: {url_path}" | |
| raise ValueError(msg) | |
| msg = (f"Cannot strip {strip_levels} levels from path with only " | |
| f"{len(path_parts)} parts: {url_path}") | |
| raise ValueError(msg) |
Fix multi-line construction of 'msg'.
No description provided.