KiCad / kicad-library-utils

Some scripts for helping with library development
GNU General Public License v3.0
128 stars 95 forks source link

Move rule descriptions to rule class docstrings #243

Open Ratfink opened 6 years ago

Ratfink commented 6 years ago

As I wrote in #220, the rule class docstrings seem like a more sensible place for rule descriptions than burying them in the __init__ method. I offered to make this change a couple of months ago, and have seen no objections, so here it is.

While moving the descriptions, I changed them all to match the one-line rule names in KLC 3.0.11, the current revision. All the docstrings I touched now come at least reasonably close to following PEP 257. Hooray for good code style!

In moving the descriptions out of the constructor, many rule classes no longer need to define their own constructors at all, so overall this reduces how much code we have to maintain.

Fixes #220.

poeschlr commented 6 years ago

Good idea. However we have a merge conflict now as i merged other stuff. Could you look into that?

Ratfink commented 5 years ago

The conflict has been resolved; can this be merged now?

evanshultz commented 4 years ago

@poeschlr Do you still want to revisit this? If so, we'll need to merge in master in order to merge this PR.

poeschlr commented 4 years ago

It is a good idea in general but i suspect @Ratfink will no longer work on this. Maybe somebody with a lot of time on their hand will continue this effort.

Which is why i marked it as abandoned as users can then search for this label for things they can help with.