skywater-pdk/scripts/python-skywater-pdk
Christian Clauss cc2568a443
Undefined name: minor -> self.hash
[flake8](http://flake8.pycqa.org) testing of https://github.com/google/skywater-pdk on Python 3.8.3

$ __flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics__
```
./scripts/python-skywater-pdk/skywater_pdk/base.py:332:71: F821 undefined name 'minor'
        return (self.milestone, self.major, self.minor, self.commits, minor)
                                                                      ^
1     F821 undefined name 'minor'
1
```
https://flake8.pycqa.org/en/latest/user/error-codes.html

On the flake8 test selection, this PR does _not_ focus on "_style violations_" (the majority of flake8 error codes that [__psf/black__](https://github.com/psf/black) can autocorrect).  Instead these tests are focus on runtime safety and correctness:
* E9 tests are about Python syntax errors usually raised because flake8 can not build an Abstract Syntax Tree (AST).  Often these issues are a sign of unused code or code that has not been ported to Python 3.  These would be compile-time errors in a compiled language but in a dynamic language like Python they result in the script halting/crashing on the user.
* F63 tests are usually about the confusion between identity and equality in Python.  Use ==/!= to compare str, bytes, and int literals is the classic case.  These are areas where __a == b__ is True but __a is b__ is False (or vice versa).  Python >= 3.8 will raise SyntaxWarnings on these instances.
* F7 tests logic errors and syntax errors in type hints
* F82 tests are almost always _undefined names_ which are usually a sign of a typo, missing imports, or code that has not been ported to Python 3.  These also would be compile-time errors in a compiled language but in Python a __NameError__ is raised which will halt/crash the script on the user.
2020-07-02 21:39:19 +02:00
..
docs docs: Adding the Python API to output docs. 2020-06-11 14:03:54 -07:00
skywater_pdk Undefined name: minor -> self.hash 2020-07-02 21:39:19 +02:00
LICENSE scripts: Adding initial version of the python-skywater-pdk module. 2020-06-11 14:01:44 -07:00
README.rst scripts: Adding initial version of the python-skywater-pdk module. 2020-06-11 14:01:44 -07:00
setup.py scripts: Adding initial version of the python-skywater-pdk module. 2020-06-11 14:01:44 -07:00

README.rst

skywater-pdk Python Module
==========================

This Python module is a small library for working with the files found inside
the SkyWater PDK.

It includes tools for decoding things like file names into human readable
descriptions.

It also includes tools for combining files together.

License
=======

Like the SkyWater Open Source PDK, the SkyWater Python Module is released under
the
`Apache 2.0 license <https://github.com/google/skywater-pdk/blob/master/scripts/python-skywater-pdk/LICENSE>`_.

The copyright details (which should also be found at the top of every file) are;

::

   Copyright 2020 SkyWater PDK Authors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.