Add type check when creating a new MerginProject#255
Add type check when creating a new MerginProject#255MarcelGeo merged 2 commits intoMerginMaps:masterfrom
Conversation
MarcelGeo
left a comment
There was a problem hiding this comment.
Hi @constantinneagu .
I double-checked what is happening here. Wouldn't it be better to just cast logger_name to a string in the setup_logging method? I think it's just an abstract logger name for the logging library.
str(logger_name)
We are using the os library for manipulating paths in the code. Therefore, we can probably use path-like objects in mergin-client.
Thanks for your contribution, @constantinneagu .
|
Hi @MarcelGeo. Since I'm not familiar with the code base, I was trying to avoid introducing too many side effects, while at the same time (potentially) sparing a future user from a little bit of frustration. Your solution makes more sense, and it will remove a little bit of weirdness from my side of the code 😄. I'm going to try it and report back. |
MarcelGeo
left a comment
There was a problem hiding this comment.
If everything is running properly now, thanks for your contribution @constantinneagu
When initializing a new
MerginProject, directory must be astr. If we pass something else, like apathlib.Path, we get a weird error when the logger is initialized.