@npsf_usa Totally Bogus, Man. Your Unsolicited Call (To A Number On The Do Not Call List) Harshed My Coding Groove.

Posted in Uncategorized on July 19, 2017 by mwchase

A Survey Of The @codacy Issues I Have Yet To Resolve

Posted in Uncategorized on July 16, 2017 by mwchase

(NB: Codacy seems to skip issues under some circumstances, so like a pesky JRPG boss, there may be more on these themes, currently hidden.)

These are the issues that Codacy currently has with my “Class Namespaces” project. I have every Bandit pattern except “Assert used” (it hated my test code) on, Prospector is off because I couldn’t figure out how to tell it to not interpret my Python 3 code as Python 2 code, and all of Pylint is on except “Prohibits classes just to store data” (R0903) (because I disagree with it), W9005 is off because… I don’t know, it must have defaulted to off, and “Simplify if statement” is off because I don’t remember.

  • “Prohibits unused variables” (9): This is normally a pretty useful message, but it’s tripping over the test code. In my code, they’re all for throwaway test classes that were constructed to observe side effects, or confirm that the construction itself worked.
  • “Enforces naming conventions” (9): This is a mix. There’s one instance where the result of a class decorator is assigned to a variable, instead of being used as a decorator. I feel like I should just disable that one locally. The other eight are test function names that I still haven’t gotten under thirty characters. So I like to be descriptive.
  • “Prohibits not used arguments” (2): I disabled a bunch of these in the source, because they were from a Pylint bug that I’m pretty sure is known, but the two remaining do fit. They’re one-off methods in which the point is to observe the side effects of their definition. They, like many of the issues I encountered, existed originally in the Python test suites I adapted to make sure I was still upholding ABC contracts.
  • “Prohibits classes without referencing” (2): I’m honestly confused how this didn’t end up in the previous issue. It’s basically the same, at least in this context.
  • “Prohibits a protected member access outside scope” (1): On balance, it probably wouldn’t be a big deal to eliminate this one.
  • “Prohibits an abstract method not overridden” (1): This is a Pylint warning (W0223) that I wish I could feel as strongly about as R0903, because I’m constantly running afoul of it, but I haven’t yet convinced myself it would make sense to get rid of it. I’m going to spend the remainder of the post looking at Pylint bugs related to abstract classes.

False positive: no-self-argument on abstract static methods: I’ll be honest, I don’t understand part of the rationale for closing this bug. Claudiu Popa is correct that

    @abstractstaticmethod
    def static(self): return self

is valid Python, but so is

    @staticmethod
    def static(self): return self

I fail to see the substantive difference. That said, yes, the composed decorators are deprecated.

Looking through the issues actually related to W0223, (179, 565, 843), I guess the problem comes down to documenting intent. And one way to document the intent that a class is abstract… is with a local Pylint disable comment.

I Will No Longer Be Posting Wild Speculation About How Twitter “Works”

Posted in Uncategorized on June 29, 2017 by mwchase

I have decided to stop using my alt account, which is where I got most of the data from.

Evidently, Accidentally Spelling “Refrigerator” With A “D” Was A Bridge Too Far

Posted in Uncategorized on June 10, 2017 by mwchase

Screen Shot 2017-06-09 at 10.06.35 PM

Duolingo normally smoothes over small typos. NOT THIS TIME, BUCKAROO!

Spam Nuggets: Is The Fountain Of Youth An Illicit Performance Enhancer, Or…

Posted in Uncategorized on June 5, 2017 by mwchase

Screen Shot 2017-06-05 at 4.59.30 PM

(I suppose there’s no point in railing against the emphasis quotes…)

Spam Nuggets: The Trick Is To Do It Very Slowly

Posted in Uncategorized on June 5, 2017 by mwchase

Screen Shot 2017-06-05 at 4.55.26 PM

Spam Nuggets: Horror Movies Aren’t Even TRYING, These Days

Posted in Uncategorized on June 2, 2017 by mwchase

Screen Shot 2017-06-02 at 4.48.02 PM