Coder Social home page Coder Social logo

Handle missing packages about fixit HOT 2 CLOSED

instagram avatar instagram commented on May 18, 2024 1
Handle missing packages

from fixit.

Comments (2)

lisroach avatar lisroach commented on May 18, 2024

Forcing a package to not have packages takes a little carwheeling since it really wants to set a default, but when you do remove it you get:

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/python37/3.7.5_3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/homebrew/Cellar/python37/3.7.5_3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/lisroach/Fixit/fixit/cli/run_rules.py", line 57, in <module>
    get_rules_parser(),
  File "/Users/lisroach/Fixit/fixit/cli/args.py", line 107, in get_rules_parser
    default=get_rules_from_config(),
  File "/Users/lisroach/Fixit/fixit/common/config.py", line 140, in get_rules_from_config
    for package in lint_config.packages:
AttributeError: 'LintConfig' object has no attribute 'packages'

Part of my motivation for this is for the inheritable configs, we don't want a config to end up completely invalid with no indication to the end user.

from fixit.

lisroach avatar lisroach commented on May 18, 2024

Actually in real world scenarios it looks like it is not possible for packages to be missing, since the default of fixit.rules is always set. I'll close this issue.

from fixit.

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.