Coding 2020-01-31

By Max Woerner Chase

I wasn't really focused today, so I got just a little work done on the coding front.

One change I wanted to make to the auto-roller code was to turn some of the code that I pulled in from the old Mythic setup into data files. That will let me make the code much more compact, and stop wemake-python-styleguide from raising quite so many warnings/errors/whatever.

Speaking of wemake-python-styleguide, I kind of disagree with some of the underlying philosophy, so I'm trying to put together my own ideas.

One aspect that I'm currently kind of skeptical of is the sense I get of a one-size-fits-all approach. Like that all code of a broad category is "basically the same", and that means that if code in that category deviates from the set standard, either the code must be changed, or the standard has to be changed across the board. I don't know if that's the actual process, that's just how it seems from my reading of the documentation and experience filing bugs so far.

Speaking for myself, one idea that occurred to me is to have some kind of comment-based annotation syntax that could communicate verifiable assertions that it's not reasonable to expect the linter to check itself. Like, "this class is an enum" or "this decorator applies classmethod" or "this is a context manager". Ideally, such things could have default configuration, and also some kind of per-project or library-based component, so there could be custom stuff like "this is an adt.Sum". (Structured Data convention is that Ctors are CamelCase, though I don't think anything actually enforces that; I could be wrong.)

I'll have to look into this idea tomorrow. Right now it's late and I'm sleepy.

Good night.