[PATCH 1/2] Convert host checking to pytest.
Amar Takhar
amar at rtems.org
Mon Mar 16 04:17:29 UTC 2020
On 2020-03-15 21:18 -0600, Gedare Bloom wrote:
>
> I found what I was thinking about:
> http://google.github.io/styleguide/pyguide.html#313-imports-formatting
>
> PEP has similar guidance:
> https://www.python.org/dev/peps/pep-0008/#imports
PEP8 is so old that even the Python project breaks many of the conventions
listed there. I really wish it would be updated to reflect newer tools and
design styles.
> But there is another problem, which is the restriction not to import
> specific classes/functions:
> http://google.github.io/styleguide/pyguide.html#22-imports
>
> I'm not sure, but I think that also is violated here. PEP doesn't
> restrict on this.
Yeah, I agree with this for the most part there are cases where I would agree
with importing a single function if you have to use it frequently and it's the
only one, maybe two you use out of the entire module. Otherwise it's much
better to just import the whole module for clarity.
The other case is whenyourmodulenameisaboutthislongandyourfuncisreally.short()
Nobody wants to read or type that. :)
> As usual exceptions can be made for good reasons, which you both have
> given and is in the current practice in RTEMS python code, but we do
> need to be aware of these deviations from whatever style guide we end
> up using as our baseline. The more deviations, the harder it is to
> check code automatically using tools from other projects.
Yeah, I agree on this for sure we should have our own style guide
Amar.
More information about the devel
mailing list