Study and respond to PyLint

Add a reasonably tolerant .pylintrc and fix most pylint errors and
warnings.

------------------------------------------------------------------
Your code has been rated at 9.78/10
This commit is contained in:
Pim van Pelt
2022-04-22 19:31:38 +00:00
parent f8a6c3eba7
commit bc0310e088
21 changed files with 343 additions and 330 deletions

View File

@ -11,7 +11,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import logging
import netaddr
@ -19,7 +18,7 @@ def is_valid(mac):
"""Return True if the string given in `mac` is a valid (6-byte) MAC address,
as defined by netaddr.EUI"""
try:
addr = netaddr.EUI(mac)
_addr = netaddr.EUI(mac)
except:
return False
return True