[chore] Stricter ruff rules#282
Conversation
|
Thank you for all the work on the code style! |
|
Hi! Thanks for taking the time to implement this! I am still in the process of looking through the changes. I was wondering about the change of the handling of random numbers. I understand that switching to As I understand it, changing the numpy random seed will not affect the state of the random number generator anymore, right? So there won't be any way to fix the seed in the random number generator in the future, when its initialization is hidden in the module. Could this lead to problems? |
Restore use of the global np.random state in pseudo_Obs (misc.py) and the prior id generation (fits.py), keeping seed behavior unchanged. The switch to a module-local generator is out of scope for this lint-focused PR.
The RNG migration was reverted to keep np.random.seed() behavior, so add per-line noqa: NPY002 on the three legacy np.random calls instead of the Generator API.
|
After quite some time I had another look at this PR. I agree with leaving the RNG changes out of this PR and potentially do them separately or not at all. I removed the rng changes from the diff. Could you review the changes that are left @s-kuberski @jkuhl-uni ? |
|
Hi, |
This PR imposes stricter ruff rules and fixes the parts which raise errors now. Main changes: