GithubHelp home page GithubHelp logo

Comments (3)

gronke avatar gronke commented on May 29, 2024

Agreed. Needs to be addressed! Should not be too complicated to fix, but a bit hard to spot. Is there a static code analyzer that does check for it?

from libioc.

igalic avatar igalic commented on May 29, 2024

i don't know…
it doesn't seem to be in pylint, https://pylint.readthedocs.io/en/latest/technical_reference/extensions.html
and we already use flake8, which dosen't seem to catch those either: http://flake8.pycqa.org/en/latest/user/error-codes.html


we should definitely (also?) consider using MyPy.
This one will also be able to check our type hints (#39).

from libioc.

igalic avatar igalic commented on May 29, 2024

after installing flake8-mutable, i get the following:

./iocage/lib/Network.py:36:33: M511 - mutable default arg of type List
./iocage/lib/DevfsRules.py:33:47: M511 - mutable default arg of type List
./iocage/lib/Jail.py:186:63: M511 - mutable default arg of type Dict
./iocage/lib/Filter.py:46:36: M511 - mutable default arg of type Call
./iocage/lib/NetworkInterface.py:34:33: M511 - mutable default arg of type List
./iocage/lib/NetworkInterface.py:35:33: M511 - mutable default arg of type List
./iocage/lib/NetworkInterface.py:43:33: M511 - mutable default arg of type List

from libioc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.