exercism-analysis 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/exercism-analysis.gemspec +30 -0
- data/lib/exercism-analysis.rb +38 -0
- data/lib/exercism-analysis/adapters/adapter.rb +23 -0
- data/lib/exercism-analysis/adapters/clojure.rb +13 -0
- data/lib/exercism-analysis/adapters/go.rb +19 -0
- data/lib/exercism-analysis/adapters/javascript.rb +13 -0
- data/lib/exercism-analysis/adapters/python.rb +13 -0
- data/lib/exercism-analysis/adapters/ruby.rb +19 -0
- data/lib/exercism-analysis/analysis.rb +18 -0
- data/lib/exercism-analysis/analyzers/analyzer.rb +54 -0
- data/lib/exercism-analysis/analyzers/clojure/kibit.rb +25 -0
- data/lib/exercism-analysis/analyzers/go/golint.rb +23 -0
- data/lib/exercism-analysis/analyzers/javascript/jslint.rb +24 -0
- data/lib/exercism-analysis/analyzers/python/pylint.rb +24 -0
- data/lib/exercism-analysis/analyzers/ruby/control_flow.rb +21 -0
- data/lib/exercism-analysis/analyzers/ruby/enumerable_condition.rb +21 -0
- data/lib/exercism-analysis/analyzers/ruby/for_loop.rb +29 -0
- data/lib/exercism-analysis/analyzers/ruby/indentation.rb +21 -0
- data/lib/exercism-analysis/analyzers/ruby/iter_mutation.rb +37 -0
- data/lib/exercism-analysis/analyzers/ruby/output.rb +20 -0
- data/lib/exercism-analysis/analyzers/ruby/range.rb +28 -0
- data/lib/exercism-analysis/analyzers/ruby/roodi.rb +19 -0
- data/lib/exercism-analysis/analyzers/ruby/send.rb +25 -0
- data/lib/exercism-analysis/analyzers/ruby/shebang.rb +23 -0
- data/lib/exercism-analysis/analyzers/ruby/tab.rb +38 -0
- data/lib/exercism-analysis/processors/call_processor.rb +39 -0
- data/lib/exercism-analysis/processors/control_flow_processor.rb +27 -0
- data/lib/exercism-analysis/processors/enumerable_condition_processor.rb +31 -0
- data/lib/exercism-analysis/processors/for_loop_processor.rb +21 -0
- data/lib/exercism-analysis/processors/indentation_processor.rb +69 -0
- data/lib/exercism-analysis/processors/iter_mutation_processor.rb +50 -0
- data/lib/exercism-analysis/processors/processor.rb +34 -0
- data/lib/exercism-analysis/processors/range_processor.rb +23 -0
- data/lib/exercism-analysis/processors/send_processor.rb +23 -0
- data/lib/exercism-analysis/templates/each_to_map.rb +29 -0
- data/lib/exercism-analysis/templates/each_to_select.rb +31 -0
- data/lib/exercism-analysis/templates/range_exclusive.rb +19 -0
- data/lib/exercism-analysis/templates/template.rb +29 -0
- data/vendor/clojure/kibit-runner/LICENSE +214 -0
- data/vendor/clojure/kibit-runner/project.clj +10 -0
- data/vendor/clojure/kibit-runner/src/kibit_runner/core.clj +17 -0
- data/vendor/clojure/kibit-runner/target/kibit-runner-0.1.0-SNAPSHOT-standalone.jar +0 -0
- data/vendor/clojure/kibit-runner/target/kibit-runner-0.1.0-SNAPSHOT.jar +0 -0
- data/vendor/clojure/kibit-runner/target/stale/extract-native.dependencies +1 -0
- data/vendor/go/src/github.com/golang/lint/LICENSE +27 -0
- data/vendor/go/src/github.com/golang/lint/README +59 -0
- data/vendor/go/src/github.com/golang/lint/golint/golint.go +67 -0
- data/vendor/go/src/github.com/golang/lint/lint.go +1061 -0
- data/vendor/go/src/runner/golint_runner.go +23 -0
- data/vendor/javascript/jshint_runner.js +6 -0
- data/vendor/javascript/node_modules/jshint/README.md +47 -0
- data/vendor/javascript/node_modules/jshint/bin/apply +6 -0
- data/vendor/javascript/node_modules/jshint/bin/build +36 -0
- data/vendor/javascript/node_modules/jshint/bin/changelog +36 -0
- data/vendor/javascript/node_modules/jshint/bin/jshint +3 -0
- data/vendor/javascript/node_modules/jshint/bin/land +34 -0
- data/vendor/javascript/node_modules/jshint/data/ascii-identifier-data.js +22 -0
- data/vendor/javascript/node_modules/jshint/data/non-ascii-identifier-part-only.js +1570 -0
- data/vendor/javascript/node_modules/jshint/data/non-ascii-identifier-start.js +48477 -0
- data/vendor/javascript/node_modules/jshint/dist/jshint-rhino.js +60642 -0
- data/vendor/javascript/node_modules/jshint/dist/jshint.js +60525 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/README.md +196 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/cli.js +1139 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/cat.js +17 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/command.js +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/echo.js +54 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/glob.js +6 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/long_desc.js +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/progress.js +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/sort.js +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/spinner.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/static.coffee +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/static.js +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/index.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/LICENSE +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/README.md +250 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/examples/g.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/examples/usr-local.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/glob.js +728 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/README.md +42 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/package.json +51 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/test.js +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/package.json +58 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/00-setup.js +176 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/bash-comparison.js +63 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/bash-results.json +351 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/cwd-test.js +55 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/globstar-match.js +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/mark.js +118 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/new-glob-optional-options.js +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/nocase-nomagic.js +113 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/pause-resume.js +73 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/readme-issue.js +36 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/root-nomount.js +39 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/root.js +46 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/stat.js +32 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/zz-cleanup.js +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/package.json +70 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/LICENCE +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/README.md +33 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/index.js +86 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/LICENCE +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/README.md +45 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/index.js +5 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/package.json +89 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/seed.js +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/test/index.js +28 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/test/static/index.html +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/package.json +88 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/test/index.js +67 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/test/static/index.html +12 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/test/static/test-adapter.js +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/Gruntfile.js +48 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/LICENSE-MIT +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/README.md +75 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/lib/exit.js +41 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/package.json +69 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/exit_test.js +121 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/10-stderr.txt +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/10-stdout-stderr.txt +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/10-stdout.txt +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/100-stderr.txt +100 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/100-stdout-stderr.txt +200 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/100-stdout.txt +100 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/1000-stderr.txt +1000 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/1000-stdout-stderr.txt +2000 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/1000-stdout.txt +1000 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/create-files.sh +8 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/log-broken.js +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/log.js +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/LICENSE +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/README.md +83 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/CollectingHandler.js +55 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/FeedHandler.js +95 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/Parser.js +337 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/ProxyHandler.js +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/Stream.js +35 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/Tokenizer.js +891 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/WritableStream.js +21 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/index.js +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/LICENSE +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/index.js +14 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/package.json +40 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/readme.md +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/LICENSE +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/index.js +211 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/package.json +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/readme.md +102 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/01-basic.json +57 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/02-single_tag_1.json +21 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/03-single_tag_2.json +21 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/04-unescaped_in_script.json +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/05-tags_in_comment.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/06-comment_in_script.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/07-unescaped_in_style.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/08-extra_spaces_in_tag.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/09-unquoted_attrib.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/10-singular_attribute.json +15 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/11-text_outside_tags.json +40 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/12-text_only.json +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/13-comment_in_text.json +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/14-comment_in_text_in_script.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/15-non-verbose.json +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/16-normalize_whitespace.json +47 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/17-xml_namespace.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/18-enforce_empty_tags.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/19-ignore_empty_tags.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/20-template_script_tags.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/21-conditional_comments.json +15 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/22-lowercase_tags.json +41 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/23-dom-lvl1.json +121 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/tests.js +58 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/LICENSE +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/index.js +14 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js +141 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js +87 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js +77 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/querying.js +94 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js +93 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js +24 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/package.json +71 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/readme.md +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/test/fixture.js +6 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/test/tests/helpers.js +89 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/test/tests/legacy.js +119 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/test/utils.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/LICENSE +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/index.js +31 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/lib/decode.js +72 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/lib/decode_codepoint.js +26 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/lib/encode.js +48 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/maps/decode.json +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/maps/entities.json +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/maps/legacy.json +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/maps/xml.json +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/package.json +79 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/readme.md +31 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/test/mocha.opts +2 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/test/test.js +150 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/LICENSE +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/README.md +15 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/duplex.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/float.patch +923 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_duplex.js +89 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_passthrough.js +46 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_readable.js +944 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_transform.js +209 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_writable.js +472 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/README.md +3 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/float.patch +604 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +107 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/package.json +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/util.js +106 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/LICENSE +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/README.md +42 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/inherits.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/inherits_browser.js +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/package.json +51 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/test.js +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/README.md +54 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/build/build.js +209 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/component.json +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/index.js +3 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/package.json +54 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/LICENSE +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/README.md +7 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/index.js +200 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/package.json +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/package.json +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/passthrough.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/readable.js +7 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/transform.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/writable.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/package.json +90 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/01-events.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/02-stream.js +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/03-feed.js +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/Atom_Example.xml +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/Attributes.html +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/Basic.html +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/RDF_Example.xml +63 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/RSS_Example.xml +48 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/01-simple.json +44 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/02-template.json +63 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/03-lowercase_tags.json +46 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/04-cdata.json +50 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/05-cdata-special.json +35 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/06-leading-lt.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/07-self-closing.json +67 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/08-implicit-close-tags.json +59 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/09-attributes.json +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/10-crazy-attrib.json +52 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/11-script_in_script.json +54 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/12-long-comment-end.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/13-long-cdata-end.json +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/14-implicit-open-tags.json +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/15-lt-whitespace.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/16-double_attribs.json +45 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/17-numeric_entities.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/18-legacy_entities.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/19-named_entities.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/20-xml_entities.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/21-entity_in_attribute.json +38 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/22-double_brackets.json +41 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/23-legacy_entity_fail.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/24-special_special.json +133 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/25-empty_tag_name.json +13 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/26-not-quite-closed.json +35 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/27-entities_in_attributes.json +62 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/28-cdata_in_html.json +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/29-comment_edge-cases.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/30-cdata_edge-cases.json +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Feeds/01-rss.js +34 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Feeds/02-atom.js +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Feeds/03-rdf.js +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/01-basic.json +83 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/02-RSS.json +1093 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/03-Atom.json +644 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/04-RDF.json +1399 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/05-Attributes.json +354 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/api.js +63 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/test-helper.js +83 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/LICENSE +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/README.md +218 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/minimatch.js +1061 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/package.json +50 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/package.json +58 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/package.json +57 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/brace-expand.js +33 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/caching.js +14 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/defaults.js +274 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/LICENSE +26 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/README.md +569 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/bin/shjs +51 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/global.js +3 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/make.js +47 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/package.json +61 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/scripts/generate-docs.js +21 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/scripts/run-tests.js +50 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/shell.js +157 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/cat.js +43 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/cd.js +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/chmod.js +208 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/common.js +203 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/cp.js +201 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/dirs.js +191 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/echo.js +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/error.js +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/exec.js +181 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/find.js +51 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/grep.js +52 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/ln.js +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/ls.js +126 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/mkdir.js +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/mv.js +80 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/popd.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/pushd.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/pwd.js +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/rm.js +145 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/sed.js +43 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/tempdir.js +56 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/test.js +85 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/to.js +29 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/toEnd.js +29 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/which.js +83 -0
- data/vendor/javascript/node_modules/jshint/node_modules/strip-json-comments/cli.js +41 -0
- data/vendor/javascript/node_modules/jshint/node_modules/strip-json-comments/package.json +76 -0
- data/vendor/javascript/node_modules/jshint/node_modules/strip-json-comments/readme.md +74 -0
- data/vendor/javascript/node_modules/jshint/node_modules/strip-json-comments/strip-json-comments.js +64 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/LICENSE +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/README.md +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/package.json +66 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/underscore-min.js +6 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/underscore.js +1343 -0
- data/vendor/javascript/node_modules/jshint/package.json +80 -0
- data/vendor/javascript/node_modules/jshint/src/cli.js +731 -0
- data/vendor/javascript/node_modules/jshint/src/jshint.js +5023 -0
- data/vendor/javascript/node_modules/jshint/src/lex.js +1650 -0
- data/vendor/javascript/node_modules/jshint/src/messages.js +223 -0
- data/vendor/javascript/node_modules/jshint/src/platforms/rhino.js +115 -0
- data/vendor/javascript/node_modules/jshint/src/reg.js +38 -0
- data/vendor/javascript/node_modules/jshint/src/reporters/checkstyle.js +81 -0
- data/vendor/javascript/node_modules/jshint/src/reporters/default.js +34 -0
- data/vendor/javascript/node_modules/jshint/src/reporters/jslint_xml.js +57 -0
- data/vendor/javascript/node_modules/jshint/src/reporters/non_error.js +52 -0
- data/vendor/javascript/node_modules/jshint/src/state.js +28 -0
- data/vendor/javascript/node_modules/jshint/src/style.js +143 -0
- data/vendor/javascript/node_modules/jshint/src/vars.js +658 -0
- data/vendor/python/astroid/COPYING +339 -0
- data/vendor/python/astroid/COPYING.LESSER +510 -0
- data/vendor/python/astroid/ChangeLog +574 -0
- data/vendor/python/astroid/MANIFEST.in +9 -0
- data/vendor/python/astroid/README +56 -0
- data/vendor/python/astroid/README.Python3 +26 -0
- data/vendor/python/astroid/__init__.py +118 -0
- data/vendor/python/astroid/__init__.pyc +0 -0
- data/vendor/python/astroid/__pkginfo__.py +48 -0
- data/vendor/python/astroid/__pkginfo__.pyc +0 -0
- data/vendor/python/astroid/announce.txt +23 -0
- data/vendor/python/astroid/as_string.py +496 -0
- data/vendor/python/astroid/as_string.pyc +0 -0
- data/vendor/python/astroid/bases.py +618 -0
- data/vendor/python/astroid/bases.pyc +0 -0
- data/vendor/python/astroid/brain/py2gi.py +159 -0
- data/vendor/python/astroid/brain/py2gi.pyc +0 -0
- data/vendor/python/astroid/brain/py2mechanize.py +20 -0
- data/vendor/python/astroid/brain/py2mechanize.pyc +0 -0
- data/vendor/python/astroid/brain/py2qt4.py +25 -0
- data/vendor/python/astroid/brain/py2qt4.pyc +0 -0
- data/vendor/python/astroid/brain/py2stdlib.py +252 -0
- data/vendor/python/astroid/brain/py2stdlib.pyc +0 -0
- data/vendor/python/astroid/builder.py +238 -0
- data/vendor/python/astroid/builder.pyc +0 -0
- data/vendor/python/astroid/exceptions.py +51 -0
- data/vendor/python/astroid/exceptions.pyc +0 -0
- data/vendor/python/astroid/inference.py +393 -0
- data/vendor/python/astroid/inference.pyc +0 -0
- data/vendor/python/astroid/inspector.py +275 -0
- data/vendor/python/astroid/manager.py +336 -0
- data/vendor/python/astroid/manager.pyc +0 -0
- data/vendor/python/astroid/mixins.py +122 -0
- data/vendor/python/astroid/mixins.pyc +0 -0
- data/vendor/python/astroid/node_classes.py +928 -0
- data/vendor/python/astroid/node_classes.pyc +0 -0
- data/vendor/python/astroid/nodes.py +73 -0
- data/vendor/python/astroid/nodes.pyc +0 -0
- data/vendor/python/astroid/protocols.py +322 -0
- data/vendor/python/astroid/protocols.pyc +0 -0
- data/vendor/python/astroid/raw_building.py +361 -0
- data/vendor/python/astroid/raw_building.pyc +0 -0
- data/vendor/python/astroid/rebuilder.py +954 -0
- data/vendor/python/astroid/rebuilder.pyc +0 -0
- data/vendor/python/astroid/scoped_nodes.py +1118 -0
- data/vendor/python/astroid/scoped_nodes.pyc +0 -0
- data/vendor/python/astroid/setup.py +184 -0
- data/vendor/python/astroid/tox.ini +10 -0
- data/vendor/python/astroid/utils.py +236 -0
- data/vendor/python/astroid/utils.pyc +0 -0
- data/vendor/python/logilab/__init__.py +0 -0
- data/vendor/python/logilab/__init__.pyc +0 -0
- data/vendor/python/logilab/common/COPYING +339 -0
- data/vendor/python/logilab/common/COPYING.LESSER +510 -0
- data/vendor/python/logilab/common/ChangeLog +1517 -0
- data/vendor/python/logilab/common/MANIFEST.in +13 -0
- data/vendor/python/logilab/common/README +185 -0
- data/vendor/python/logilab/common/README.Python3 +29 -0
- data/vendor/python/logilab/common/__init__.py +171 -0
- data/vendor/python/logilab/common/__init__.pyc +0 -0
- data/vendor/python/logilab/common/__pkginfo__.py +53 -0
- data/vendor/python/logilab/common/__pkginfo__.pyc +0 -0
- data/vendor/python/logilab/common/announce.txt +25 -0
- data/vendor/python/logilab/common/bin/pytest +7 -0
- data/vendor/python/logilab/common/bin/pytest.bat +17 -0
- data/vendor/python/logilab/common/cache.py +114 -0
- data/vendor/python/logilab/common/changelog.py +236 -0
- data/vendor/python/logilab/common/changelog.pyc +0 -0
- data/vendor/python/logilab/common/clcommands.py +332 -0
- data/vendor/python/logilab/common/cli.py +208 -0
- data/vendor/python/logilab/common/compat.py +243 -0
- data/vendor/python/logilab/common/compat.pyc +0 -0
- data/vendor/python/logilab/common/configuration.py +1094 -0
- data/vendor/python/logilab/common/configuration.pyc +0 -0
- data/vendor/python/logilab/common/contexts.py +5 -0
- data/vendor/python/logilab/common/corbautils.py +117 -0
- data/vendor/python/logilab/common/daemon.py +100 -0
- data/vendor/python/logilab/common/date.py +333 -0
- data/vendor/python/logilab/common/dbf.py +229 -0
- data/vendor/python/logilab/common/debugger.py +210 -0
- data/vendor/python/logilab/common/decorators.py +281 -0
- data/vendor/python/logilab/common/decorators.pyc +0 -0
- data/vendor/python/logilab/common/deprecation.py +188 -0
- data/vendor/python/logilab/common/deprecation.pyc +0 -0
- data/vendor/python/logilab/common/fileutils.py +402 -0
- data/vendor/python/logilab/common/graph.py +276 -0
- data/vendor/python/logilab/common/graph.pyc +0 -0
- data/vendor/python/logilab/common/hg.py +130 -0
- data/vendor/python/logilab/common/interface.py +71 -0
- data/vendor/python/logilab/common/interface.pyc +0 -0
- data/vendor/python/logilab/common/logging_ext.py +193 -0
- data/vendor/python/logilab/common/modutils.py +695 -0
- data/vendor/python/logilab/common/modutils.pyc +0 -0
- data/vendor/python/logilab/common/optik_ext.py +391 -0
- data/vendor/python/logilab/common/optik_ext.pyc +0 -0
- data/vendor/python/logilab/common/optparser.py +90 -0
- data/vendor/python/logilab/common/proc.py +277 -0
- data/vendor/python/logilab/common/pyro_ext.py +180 -0
- data/vendor/python/logilab/common/pytest.py +1177 -0
- data/vendor/python/logilab/common/python-logilab-common.spec +184 -0
- data/vendor/python/logilab/common/registry.py +1113 -0
- data/vendor/python/logilab/common/setup.cfg +3 -0
- data/vendor/python/logilab/common/setup.py +189 -0
- data/vendor/python/logilab/common/shellutils.py +455 -0
- data/vendor/python/logilab/common/sphinx_ext.py +87 -0
- data/vendor/python/logilab/common/sphinxutils.py +122 -0
- data/vendor/python/logilab/common/table.py +925 -0
- data/vendor/python/logilab/common/tasksqueue.py +100 -0
- data/vendor/python/logilab/common/textutils.py +534 -0
- data/vendor/python/logilab/common/textutils.pyc +0 -0
- data/vendor/python/logilab/common/tree.py +369 -0
- data/vendor/python/logilab/common/tree.pyc +0 -0
- data/vendor/python/logilab/common/umessage.py +190 -0
- data/vendor/python/logilab/common/ureports/__init__.py +174 -0
- data/vendor/python/logilab/common/ureports/__init__.pyc +0 -0
- data/vendor/python/logilab/common/ureports/docbook_writer.py +139 -0
- data/vendor/python/logilab/common/ureports/html_writer.py +131 -0
- data/vendor/python/logilab/common/ureports/html_writer.pyc +0 -0
- data/vendor/python/logilab/common/ureports/nodes.py +201 -0
- data/vendor/python/logilab/common/ureports/nodes.pyc +0 -0
- data/vendor/python/logilab/common/ureports/text_writer.py +140 -0
- data/vendor/python/logilab/common/ureports/text_writer.pyc +0 -0
- data/vendor/python/logilab/common/urllib2ext.py +87 -0
- data/vendor/python/logilab/common/vcgutils.py +216 -0
- data/vendor/python/logilab/common/visitor.py +107 -0
- data/vendor/python/logilab/common/visitor.pyc +0 -0
- data/vendor/python/logilab/common/xmlrpcutils.py +131 -0
- data/vendor/python/logilab/common/xmlutils.py +61 -0
- data/vendor/python/pylint/CONTRIBUTORS.txt +38 -0
- data/vendor/python/pylint/COPYING +340 -0
- data/vendor/python/pylint/ChangeLog +1437 -0
- data/vendor/python/pylint/DEPENDS +3 -0
- data/vendor/python/pylint/MANIFEST.in +14 -0
- data/vendor/python/pylint/README +50 -0
- data/vendor/python/pylint/README.Python3 +37 -0
- data/vendor/python/pylint/__init__.py +44 -0
- data/vendor/python/pylint/__init__.pyc +0 -0
- data/vendor/python/pylint/__main__.py +3 -0
- data/vendor/python/pylint/__pkginfo__.py +74 -0
- data/vendor/python/pylint/__pkginfo__.pyc +0 -0
- data/vendor/python/pylint/bin/epylint +3 -0
- data/vendor/python/pylint/bin/epylint.bat +5 -0
- data/vendor/python/pylint/bin/pylint +3 -0
- data/vendor/python/pylint/bin/pylint-gui +3 -0
- data/vendor/python/pylint/bin/pylint-gui.bat +5 -0
- data/vendor/python/pylint/bin/pylint.bat +5 -0
- data/vendor/python/pylint/bin/pyreverse +3 -0
- data/vendor/python/pylint/bin/pyreverse.bat +5 -0
- data/vendor/python/pylint/bin/symilar +3 -0
- data/vendor/python/pylint/bin/symilar.bat +5 -0
- data/vendor/python/pylint/checkers/__init__.py +145 -0
- data/vendor/python/pylint/checkers/__init__.pyc +0 -0
- data/vendor/python/pylint/checkers/base.py +1141 -0
- data/vendor/python/pylint/checkers/base.pyc +0 -0
- data/vendor/python/pylint/checkers/classes.py +792 -0
- data/vendor/python/pylint/checkers/classes.pyc +0 -0
- data/vendor/python/pylint/checkers/design_analysis.py +367 -0
- data/vendor/python/pylint/checkers/design_analysis.pyc +0 -0
- data/vendor/python/pylint/checkers/exceptions.py +306 -0
- data/vendor/python/pylint/checkers/exceptions.pyc +0 -0
- data/vendor/python/pylint/checkers/format.py +943 -0
- data/vendor/python/pylint/checkers/format.pyc +0 -0
- data/vendor/python/pylint/checkers/imports.py +394 -0
- data/vendor/python/pylint/checkers/imports.pyc +0 -0
- data/vendor/python/pylint/checkers/logging.py +213 -0
- data/vendor/python/pylint/checkers/logging.pyc +0 -0
- data/vendor/python/pylint/checkers/misc.py +90 -0
- data/vendor/python/pylint/checkers/misc.pyc +0 -0
- data/vendor/python/pylint/checkers/newstyle.py +151 -0
- data/vendor/python/pylint/checkers/newstyle.pyc +0 -0
- data/vendor/python/pylint/checkers/raw_metrics.py +129 -0
- data/vendor/python/pylint/checkers/raw_metrics.pyc +0 -0
- data/vendor/python/pylint/checkers/similar.py +365 -0
- data/vendor/python/pylint/checkers/similar.pyc +0 -0
- data/vendor/python/pylint/checkers/stdlib.py +69 -0
- data/vendor/python/pylint/checkers/stdlib.pyc +0 -0
- data/vendor/python/pylint/checkers/strings.py +304 -0
- data/vendor/python/pylint/checkers/strings.pyc +0 -0
- data/vendor/python/pylint/checkers/typecheck.py +451 -0
- data/vendor/python/pylint/checkers/typecheck.pyc +0 -0
- data/vendor/python/pylint/checkers/utils.py +416 -0
- data/vendor/python/pylint/checkers/utils.pyc +0 -0
- data/vendor/python/pylint/checkers/variables.py +741 -0
- data/vendor/python/pylint/checkers/variables.pyc +0 -0
- data/vendor/python/pylint/config.py +156 -0
- data/vendor/python/pylint/config.pyc +0 -0
- data/vendor/python/pylint/epylint.py +175 -0
- data/vendor/python/pylint/gui.py +508 -0
- data/vendor/python/pylint/interfaces.py +72 -0
- data/vendor/python/pylint/interfaces.pyc +0 -0
- data/vendor/python/pylint/lint.py +1106 -0
- data/vendor/python/pylint/lint.pyc +0 -0
- data/vendor/python/pylint/pyreverse/__init__.py +5 -0
- data/vendor/python/pylint/pyreverse/diadefslib.py +233 -0
- data/vendor/python/pylint/pyreverse/diagrams.py +247 -0
- data/vendor/python/pylint/pyreverse/main.py +124 -0
- data/vendor/python/pylint/pyreverse/utils.py +131 -0
- data/vendor/python/pylint/pyreverse/writer.py +199 -0
- data/vendor/python/pylint/reporters/__init__.py +138 -0
- data/vendor/python/pylint/reporters/__init__.pyc +0 -0
- data/vendor/python/pylint/reporters/guireporter.py +28 -0
- data/vendor/python/pylint/reporters/guireporter.pyc +0 -0
- data/vendor/python/pylint/reporters/html.py +70 -0
- data/vendor/python/pylint/reporters/html.pyc +0 -0
- data/vendor/python/pylint/reporters/text.py +143 -0
- data/vendor/python/pylint/reporters/text.pyc +0 -0
- data/vendor/python/pylint/setup.cfg +3 -0
- data/vendor/python/pylint/setup.py +203 -0
- data/vendor/python/pylint/tox.ini +10 -0
- data/vendor/python/pylint/utils.py +744 -0
- data/vendor/python/pylint/utils.pyc +0 -0
- data/vendor/python/pylint_runner.py +22 -0
- metadata +675 -0
Binary file
|
@@ -0,0 +1,238 @@
|
|
1
|
+
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
|
2
|
+
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
|
3
|
+
#
|
4
|
+
# This file is part of astroid.
|
5
|
+
#
|
6
|
+
# astroid is free software: you can redistribute it and/or modify it
|
7
|
+
# under the terms of the GNU Lesser General Public License as published by the
|
8
|
+
# Free Software Foundation, either version 2.1 of the License, or (at your
|
9
|
+
# option) any later version.
|
10
|
+
#
|
11
|
+
# astroid is distributed in the hope that it will be useful, but
|
12
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
13
|
+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
14
|
+
# for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU Lesser General Public License along
|
17
|
+
# with astroid. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
"""The AstroidBuilder makes astroid from living object and / or from _ast
|
19
|
+
|
20
|
+
The builder is not thread safe and can't be used to parse different sources
|
21
|
+
at the same time.
|
22
|
+
"""
|
23
|
+
|
24
|
+
__docformat__ = "restructuredtext en"
|
25
|
+
|
26
|
+
import sys
|
27
|
+
from os.path import splitext, basename, exists, abspath
|
28
|
+
|
29
|
+
from logilab.common.modutils import modpath_from_file
|
30
|
+
|
31
|
+
from astroid.exceptions import AstroidBuildingException, InferenceError
|
32
|
+
from astroid.raw_building import InspectBuilder
|
33
|
+
from astroid.rebuilder import TreeRebuilder
|
34
|
+
from astroid.manager import AstroidManager
|
35
|
+
from astroid.bases import YES, Instance
|
36
|
+
|
37
|
+
from _ast import PyCF_ONLY_AST
|
38
|
+
def parse(string):
|
39
|
+
return compile(string, "<string>", 'exec', PyCF_ONLY_AST)
|
40
|
+
|
41
|
+
if sys.version_info >= (3, 0):
|
42
|
+
from tokenize import detect_encoding
|
43
|
+
|
44
|
+
def open_source_file(filename):
|
45
|
+
byte_stream = open(filename, 'bU')
|
46
|
+
encoding = detect_encoding(byte_stream.readline)[0]
|
47
|
+
byte_stream.close()
|
48
|
+
stream = open(filename, 'U', encoding=encoding)
|
49
|
+
try:
|
50
|
+
data = stream.read()
|
51
|
+
except UnicodeError, uex: # wrong encodingg
|
52
|
+
# detect_encoding returns utf-8 if no encoding specified
|
53
|
+
msg = 'Wrong (%s) or no encoding specified' % encoding
|
54
|
+
raise AstroidBuildingException(msg)
|
55
|
+
return stream, encoding, data
|
56
|
+
|
57
|
+
else:
|
58
|
+
import re
|
59
|
+
|
60
|
+
_ENCODING_RGX = re.compile("\s*#+.*coding[:=]\s*([-\w.]+)")
|
61
|
+
|
62
|
+
def _guess_encoding(string):
|
63
|
+
"""get encoding from a python file as string or return None if not found
|
64
|
+
"""
|
65
|
+
# check for UTF-8 byte-order mark
|
66
|
+
if string.startswith('\xef\xbb\xbf'):
|
67
|
+
return 'UTF-8'
|
68
|
+
for line in string.split('\n', 2)[:2]:
|
69
|
+
# check for encoding declaration
|
70
|
+
match = _ENCODING_RGX.match(line)
|
71
|
+
if match is not None:
|
72
|
+
return match.group(1)
|
73
|
+
|
74
|
+
def open_source_file(filename):
|
75
|
+
"""get data for parsing a file"""
|
76
|
+
stream = open(filename, 'U')
|
77
|
+
data = stream.read()
|
78
|
+
encoding = _guess_encoding(data)
|
79
|
+
return stream, encoding, data
|
80
|
+
|
81
|
+
# ast NG builder ##############################################################
|
82
|
+
|
83
|
+
MANAGER = AstroidManager()
|
84
|
+
|
85
|
+
class AstroidBuilder(InspectBuilder):
|
86
|
+
"""provide astroid building methods"""
|
87
|
+
|
88
|
+
def __init__(self, manager=None):
|
89
|
+
InspectBuilder.__init__(self)
|
90
|
+
self._manager = manager or MANAGER
|
91
|
+
|
92
|
+
def module_build(self, module, modname=None):
|
93
|
+
"""build an astroid from a living module instance
|
94
|
+
"""
|
95
|
+
node = None
|
96
|
+
path = getattr(module, '__file__', None)
|
97
|
+
if path is not None:
|
98
|
+
path_, ext = splitext(module.__file__)
|
99
|
+
if ext in ('.py', '.pyc', '.pyo') and exists(path_ + '.py'):
|
100
|
+
node = self.file_build(path_ + '.py', modname)
|
101
|
+
if node is None:
|
102
|
+
# this is a built-in module
|
103
|
+
# get a partial representation by introspection
|
104
|
+
node = self.inspect_build(module, modname=modname, path=path)
|
105
|
+
# we have to handle transformation by ourselves since the rebuilder
|
106
|
+
# isn't called for builtin nodes
|
107
|
+
#
|
108
|
+
# XXX it's then only called for Module nodes, not for underlying
|
109
|
+
# nodes
|
110
|
+
node = self._manager.transform(node)
|
111
|
+
return node
|
112
|
+
|
113
|
+
def file_build(self, path, modname=None):
|
114
|
+
"""build astroid from a source code file (i.e. from an ast)
|
115
|
+
|
116
|
+
path is expected to be a python source file
|
117
|
+
"""
|
118
|
+
try:
|
119
|
+
stream, encoding, data = open_source_file(path)
|
120
|
+
except IOError, exc:
|
121
|
+
msg = 'Unable to load file %r (%s)' % (path, exc)
|
122
|
+
raise AstroidBuildingException(msg)
|
123
|
+
except SyntaxError, exc: # py3k encoding specification error
|
124
|
+
raise AstroidBuildingException(exc)
|
125
|
+
except LookupError, exc: # unknown encoding
|
126
|
+
raise AstroidBuildingException(exc)
|
127
|
+
# get module name if necessary
|
128
|
+
if modname is None:
|
129
|
+
try:
|
130
|
+
modname = '.'.join(modpath_from_file(path))
|
131
|
+
except ImportError:
|
132
|
+
modname = splitext(basename(path))[0]
|
133
|
+
# build astroid representation
|
134
|
+
module = self._data_build(data, modname, path)
|
135
|
+
return self._post_build(module, encoding)
|
136
|
+
|
137
|
+
def string_build(self, data, modname='', path=None):
|
138
|
+
"""build astroid from source code string and return rebuilded astroid"""
|
139
|
+
module = self._data_build(data, modname, path)
|
140
|
+
module.file_bytes = data.encode('utf-8')
|
141
|
+
return self._post_build(module, 'utf-8')
|
142
|
+
|
143
|
+
def _post_build(self, module, encoding):
|
144
|
+
"""handles encoding and delayed nodes
|
145
|
+
after a module has been built
|
146
|
+
"""
|
147
|
+
module.file_encoding = encoding
|
148
|
+
self._manager.cache_module(module)
|
149
|
+
# post tree building steps after we stored the module in the cache:
|
150
|
+
for from_node in module._from_nodes:
|
151
|
+
if from_node.modname == '__future__':
|
152
|
+
for symbol, _ in from_node.names:
|
153
|
+
module.future_imports.add(symbol)
|
154
|
+
self.add_from_names_to_locals(from_node)
|
155
|
+
# handle delayed assattr nodes
|
156
|
+
for delayed in module._delayed_assattr:
|
157
|
+
self.delayed_assattr(delayed)
|
158
|
+
return module
|
159
|
+
|
160
|
+
def _data_build(self, data, modname, path):
|
161
|
+
"""build tree node from data and add some informations"""
|
162
|
+
# this method could be wrapped with a pickle/cache function
|
163
|
+
node = parse(data + '\n')
|
164
|
+
if path is not None:
|
165
|
+
node_file = abspath(path)
|
166
|
+
else:
|
167
|
+
node_file = '<?>'
|
168
|
+
if modname.endswith('.__init__'):
|
169
|
+
modname = modname[:-9]
|
170
|
+
package = True
|
171
|
+
else:
|
172
|
+
package = path and path.find('__init__.py') > -1 or False
|
173
|
+
rebuilder = TreeRebuilder(self._manager)
|
174
|
+
module = rebuilder.visit_module(node, modname, package)
|
175
|
+
module.file = module.path = node_file
|
176
|
+
module._from_nodes = rebuilder._from_nodes
|
177
|
+
module._delayed_assattr = rebuilder._delayed_assattr
|
178
|
+
return module
|
179
|
+
|
180
|
+
def add_from_names_to_locals(self, node):
|
181
|
+
"""store imported names to the locals;
|
182
|
+
resort the locals if coming from a delayed node
|
183
|
+
"""
|
184
|
+
|
185
|
+
_key_func = lambda node: node.fromlineno
|
186
|
+
def sort_locals(my_list):
|
187
|
+
my_list.sort(key=_key_func)
|
188
|
+
for (name, asname) in node.names:
|
189
|
+
if name == '*':
|
190
|
+
try:
|
191
|
+
imported = node.root().import_module(node.modname)
|
192
|
+
except AstroidBuildingException:
|
193
|
+
continue
|
194
|
+
for name in imported.wildcard_import_names():
|
195
|
+
node.parent.set_local(name, node)
|
196
|
+
sort_locals(node.parent.scope().locals[name])
|
197
|
+
else:
|
198
|
+
node.parent.set_local(asname or name, node)
|
199
|
+
sort_locals(node.parent.scope().locals[asname or name])
|
200
|
+
|
201
|
+
def delayed_assattr(self, node):
|
202
|
+
"""visit a AssAttr node -> add name to locals, handle members
|
203
|
+
definition
|
204
|
+
"""
|
205
|
+
try:
|
206
|
+
frame = node.frame()
|
207
|
+
for infered in node.expr.infer():
|
208
|
+
if infered is YES:
|
209
|
+
continue
|
210
|
+
try:
|
211
|
+
if infered.__class__ is Instance:
|
212
|
+
infered = infered._proxied
|
213
|
+
iattrs = infered.instance_attrs
|
214
|
+
elif isinstance(infered, Instance):
|
215
|
+
# Const, Tuple, ... we may be wrong, may be not, but
|
216
|
+
# anyway we don't want to pollute builtin's namespace
|
217
|
+
continue
|
218
|
+
elif infered.is_function:
|
219
|
+
iattrs = infered.instance_attrs
|
220
|
+
else:
|
221
|
+
iattrs = infered.locals
|
222
|
+
except AttributeError:
|
223
|
+
# XXX log error
|
224
|
+
#import traceback
|
225
|
+
#traceback.print_exc()
|
226
|
+
continue
|
227
|
+
values = iattrs.setdefault(node.attrname, [])
|
228
|
+
if node in values:
|
229
|
+
continue
|
230
|
+
# get assign in __init__ first XXX useful ?
|
231
|
+
if frame.name == '__init__' and values and not \
|
232
|
+
values[0].frame().name == '__init__':
|
233
|
+
values.insert(0, node)
|
234
|
+
else:
|
235
|
+
values.append(node)
|
236
|
+
except InferenceError:
|
237
|
+
pass
|
238
|
+
|
Binary file
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
|
2
|
+
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
|
3
|
+
#
|
4
|
+
# This file is part of astroid.
|
5
|
+
#
|
6
|
+
# astroid is free software: you can redistribute it and/or modify it
|
7
|
+
# under the terms of the GNU Lesser General Public License as published by the
|
8
|
+
# Free Software Foundation, either version 2.1 of the License, or (at your
|
9
|
+
# option) any later version.
|
10
|
+
#
|
11
|
+
# astroid is distributed in the hope that it will be useful, but
|
12
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
13
|
+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
14
|
+
# for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU Lesser General Public License along
|
17
|
+
# with astroid. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
"""this module contains exceptions used in the astroid library
|
19
|
+
|
20
|
+
"""
|
21
|
+
|
22
|
+
__doctype__ = "restructuredtext en"
|
23
|
+
|
24
|
+
class AstroidError(Exception):
|
25
|
+
"""base exception class for all astroid related exceptions"""
|
26
|
+
|
27
|
+
class AstroidBuildingException(AstroidError):
|
28
|
+
"""exception class when we are unable to build an astroid representation"""
|
29
|
+
|
30
|
+
class ResolveError(AstroidError):
|
31
|
+
"""base class of astroid resolution/inference error"""
|
32
|
+
|
33
|
+
class NotFoundError(ResolveError):
|
34
|
+
"""raised when we are unable to resolve a name"""
|
35
|
+
|
36
|
+
class InferenceError(ResolveError):
|
37
|
+
"""raised when we are unable to infer a node"""
|
38
|
+
|
39
|
+
class UseInferenceDefault(Exception):
|
40
|
+
"""exception to be raised in custom inference function to indicate that it
|
41
|
+
should go back to the default behaviour
|
42
|
+
"""
|
43
|
+
|
44
|
+
class UnresolvableName(InferenceError):
|
45
|
+
"""raised when we are unable to resolve a name"""
|
46
|
+
|
47
|
+
class NoDefault(AstroidError):
|
48
|
+
"""raised by function's `default_value` method when an argument has
|
49
|
+
no default value
|
50
|
+
"""
|
51
|
+
|
Binary file
|
@@ -0,0 +1,393 @@
|
|
1
|
+
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
|
2
|
+
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
|
3
|
+
#
|
4
|
+
# This file is part of astroid.
|
5
|
+
#
|
6
|
+
# astroid is free software: you can redistribute it and/or modify it
|
7
|
+
# under the terms of the GNU Lesser General Public License as published by the
|
8
|
+
# Free Software Foundation, either version 2.1 of the License, or (at your
|
9
|
+
# option) any later version.
|
10
|
+
#
|
11
|
+
# astroid is distributed in the hope that it will be useful, but
|
12
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
13
|
+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
14
|
+
# for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU Lesser General Public License along
|
17
|
+
# with astroid. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
"""this module contains a set of functions to handle inference on astroid trees
|
19
|
+
"""
|
20
|
+
|
21
|
+
__doctype__ = "restructuredtext en"
|
22
|
+
|
23
|
+
from itertools import chain
|
24
|
+
|
25
|
+
from astroid import nodes
|
26
|
+
|
27
|
+
from astroid.manager import AstroidManager
|
28
|
+
from astroid.exceptions import (AstroidError,
|
29
|
+
InferenceError, NoDefault, NotFoundError, UnresolvableName)
|
30
|
+
from astroid.bases import YES, Instance, InferenceContext, \
|
31
|
+
_infer_stmts, copy_context, path_wrapper, raise_if_nothing_infered
|
32
|
+
from astroid.protocols import _arguments_infer_argname
|
33
|
+
|
34
|
+
MANAGER = AstroidManager()
|
35
|
+
|
36
|
+
|
37
|
+
class CallContext:
|
38
|
+
"""when inferring a function call, this class is used to remember values
|
39
|
+
given as argument
|
40
|
+
"""
|
41
|
+
def __init__(self, args, starargs, dstarargs):
|
42
|
+
self.args = []
|
43
|
+
self.nargs = {}
|
44
|
+
for arg in args:
|
45
|
+
if isinstance(arg, nodes.Keyword):
|
46
|
+
self.nargs[arg.arg] = arg.value
|
47
|
+
else:
|
48
|
+
self.args.append(arg)
|
49
|
+
self.starargs = starargs
|
50
|
+
self.dstarargs = dstarargs
|
51
|
+
|
52
|
+
def infer_argument(self, funcnode, name, context):
|
53
|
+
"""infer a function argument value according to the call context"""
|
54
|
+
# 1. search in named keywords
|
55
|
+
try:
|
56
|
+
return self.nargs[name].infer(context)
|
57
|
+
except KeyError:
|
58
|
+
# Function.args.args can be None in astroid (means that we don't have
|
59
|
+
# information on argnames)
|
60
|
+
argindex = funcnode.args.find_argname(name)[0]
|
61
|
+
if argindex is not None:
|
62
|
+
# 2. first argument of instance/class method
|
63
|
+
if argindex == 0 and funcnode.type in ('method', 'classmethod'):
|
64
|
+
if context.boundnode is not None:
|
65
|
+
boundnode = context.boundnode
|
66
|
+
else:
|
67
|
+
# XXX can do better ?
|
68
|
+
boundnode = funcnode.parent.frame()
|
69
|
+
if funcnode.type == 'method':
|
70
|
+
if not isinstance(boundnode, Instance):
|
71
|
+
boundnode = Instance(boundnode)
|
72
|
+
return iter((boundnode,))
|
73
|
+
if funcnode.type == 'classmethod':
|
74
|
+
return iter((boundnode,))
|
75
|
+
# if we have a method, extract one position
|
76
|
+
# from the index, so we'll take in account
|
77
|
+
# the extra parameter represented by `self` or `cls`
|
78
|
+
if funcnode.type in ('method', 'classmethod'):
|
79
|
+
argindex -= 1
|
80
|
+
# 2. search arg index
|
81
|
+
try:
|
82
|
+
return self.args[argindex].infer(context)
|
83
|
+
except IndexError:
|
84
|
+
pass
|
85
|
+
# 3. search in *args (.starargs)
|
86
|
+
if self.starargs is not None:
|
87
|
+
its = []
|
88
|
+
for infered in self.starargs.infer(context):
|
89
|
+
if infered is YES:
|
90
|
+
its.append((YES,))
|
91
|
+
continue
|
92
|
+
try:
|
93
|
+
its.append(infered.getitem(argindex, context).infer(context))
|
94
|
+
except (InferenceError, AttributeError):
|
95
|
+
its.append((YES,))
|
96
|
+
except (IndexError, TypeError):
|
97
|
+
continue
|
98
|
+
if its:
|
99
|
+
return chain(*its)
|
100
|
+
# 4. XXX search in **kwargs (.dstarargs)
|
101
|
+
if self.dstarargs is not None:
|
102
|
+
its = []
|
103
|
+
for infered in self.dstarargs.infer(context):
|
104
|
+
if infered is YES:
|
105
|
+
its.append((YES,))
|
106
|
+
continue
|
107
|
+
try:
|
108
|
+
its.append(infered.getitem(name, context).infer(context))
|
109
|
+
except (InferenceError, AttributeError):
|
110
|
+
its.append((YES,))
|
111
|
+
except (IndexError, TypeError):
|
112
|
+
continue
|
113
|
+
if its:
|
114
|
+
return chain(*its)
|
115
|
+
# 5. */** argument, (Tuple or Dict)
|
116
|
+
if name == funcnode.args.vararg:
|
117
|
+
return iter((nodes.const_factory(())))
|
118
|
+
if name == funcnode.args.kwarg:
|
119
|
+
return iter((nodes.const_factory({})))
|
120
|
+
# 6. return default value if any
|
121
|
+
try:
|
122
|
+
return funcnode.args.default_value(name).infer(context)
|
123
|
+
except NoDefault:
|
124
|
+
raise InferenceError(name)
|
125
|
+
|
126
|
+
|
127
|
+
# .infer method ###############################################################
|
128
|
+
|
129
|
+
|
130
|
+
def infer_end(self, context=None):
|
131
|
+
"""inference's end for node such as Module, Class, Function, Const...
|
132
|
+
"""
|
133
|
+
yield self
|
134
|
+
nodes.Module._infer = infer_end
|
135
|
+
nodes.Class._infer = infer_end
|
136
|
+
nodes.Function._infer = infer_end
|
137
|
+
nodes.Lambda._infer = infer_end
|
138
|
+
nodes.Const._infer = infer_end
|
139
|
+
nodes.List._infer = infer_end
|
140
|
+
nodes.Tuple._infer = infer_end
|
141
|
+
nodes.Dict._infer = infer_end
|
142
|
+
nodes.Set._infer = infer_end
|
143
|
+
|
144
|
+
def infer_name(self, context=None):
|
145
|
+
"""infer a Name: use name lookup rules"""
|
146
|
+
frame, stmts = self.lookup(self.name)
|
147
|
+
if not stmts:
|
148
|
+
raise UnresolvableName(self.name)
|
149
|
+
context = context.clone()
|
150
|
+
context.lookupname = self.name
|
151
|
+
return _infer_stmts(stmts, context, frame)
|
152
|
+
nodes.Name._infer = path_wrapper(infer_name)
|
153
|
+
nodes.AssName.infer_lhs = infer_name # won't work with a path wrapper
|
154
|
+
|
155
|
+
|
156
|
+
def infer_callfunc(self, context=None):
|
157
|
+
"""infer a CallFunc node by trying to guess what the function returns"""
|
158
|
+
callcontext = context.clone()
|
159
|
+
callcontext.callcontext = CallContext(self.args, self.starargs, self.kwargs)
|
160
|
+
callcontext.boundnode = None
|
161
|
+
for callee in self.func.infer(context):
|
162
|
+
if callee is YES:
|
163
|
+
yield callee
|
164
|
+
continue
|
165
|
+
try:
|
166
|
+
if hasattr(callee, 'infer_call_result'):
|
167
|
+
for infered in callee.infer_call_result(self, callcontext):
|
168
|
+
yield infered
|
169
|
+
except InferenceError:
|
170
|
+
## XXX log error ?
|
171
|
+
continue
|
172
|
+
nodes.CallFunc._infer = path_wrapper(raise_if_nothing_infered(infer_callfunc))
|
173
|
+
|
174
|
+
|
175
|
+
def infer_import(self, context=None, asname=True):
|
176
|
+
"""infer an Import node: return the imported module/object"""
|
177
|
+
name = context.lookupname
|
178
|
+
if name is None:
|
179
|
+
raise InferenceError()
|
180
|
+
if asname:
|
181
|
+
yield self.do_import_module(self.real_name(name))
|
182
|
+
else:
|
183
|
+
yield self.do_import_module(name)
|
184
|
+
nodes.Import._infer = path_wrapper(infer_import)
|
185
|
+
|
186
|
+
def infer_name_module(self, name):
|
187
|
+
context = InferenceContext()
|
188
|
+
context.lookupname = name
|
189
|
+
return self.infer(context, asname=False)
|
190
|
+
nodes.Import.infer_name_module = infer_name_module
|
191
|
+
|
192
|
+
|
193
|
+
def infer_from(self, context=None, asname=True):
|
194
|
+
"""infer a From nodes: return the imported module/object"""
|
195
|
+
name = context.lookupname
|
196
|
+
if name is None:
|
197
|
+
raise InferenceError()
|
198
|
+
if asname:
|
199
|
+
name = self.real_name(name)
|
200
|
+
module = self.do_import_module(self.modname)
|
201
|
+
try:
|
202
|
+
context = copy_context(context)
|
203
|
+
context.lookupname = name
|
204
|
+
return _infer_stmts(module.getattr(name, ignore_locals=module is self.root()), context)
|
205
|
+
except NotFoundError:
|
206
|
+
raise InferenceError(name)
|
207
|
+
nodes.From._infer = path_wrapper(infer_from)
|
208
|
+
|
209
|
+
|
210
|
+
def infer_getattr(self, context=None):
|
211
|
+
"""infer a Getattr node by using getattr on the associated object"""
|
212
|
+
#context = context.clone()
|
213
|
+
for owner in self.expr.infer(context):
|
214
|
+
if owner is YES:
|
215
|
+
yield owner
|
216
|
+
continue
|
217
|
+
try:
|
218
|
+
context.boundnode = owner
|
219
|
+
for obj in owner.igetattr(self.attrname, context):
|
220
|
+
yield obj
|
221
|
+
context.boundnode = None
|
222
|
+
except (NotFoundError, InferenceError):
|
223
|
+
context.boundnode = None
|
224
|
+
except AttributeError:
|
225
|
+
# XXX method / function
|
226
|
+
context.boundnode = None
|
227
|
+
nodes.Getattr._infer = path_wrapper(raise_if_nothing_infered(infer_getattr))
|
228
|
+
nodes.AssAttr.infer_lhs = raise_if_nothing_infered(infer_getattr) # # won't work with a path wrapper
|
229
|
+
|
230
|
+
|
231
|
+
def infer_global(self, context=None):
|
232
|
+
if context.lookupname is None:
|
233
|
+
raise InferenceError()
|
234
|
+
try:
|
235
|
+
return _infer_stmts(self.root().getattr(context.lookupname), context)
|
236
|
+
except NotFoundError:
|
237
|
+
raise InferenceError()
|
238
|
+
nodes.Global._infer = path_wrapper(infer_global)
|
239
|
+
|
240
|
+
|
241
|
+
def infer_subscript(self, context=None):
|
242
|
+
"""infer simple subscription such as [1,2,3][0] or (1,2,3)[-1]"""
|
243
|
+
value = self.value.infer(context).next()
|
244
|
+
if value is YES:
|
245
|
+
yield YES
|
246
|
+
return
|
247
|
+
|
248
|
+
index = self.slice.infer(context).next()
|
249
|
+
if index is YES:
|
250
|
+
yield YES
|
251
|
+
return
|
252
|
+
|
253
|
+
if isinstance(index, nodes.Const):
|
254
|
+
try:
|
255
|
+
assigned = value.getitem(index.value, context)
|
256
|
+
except AttributeError:
|
257
|
+
raise InferenceError()
|
258
|
+
except (IndexError, TypeError):
|
259
|
+
yield YES
|
260
|
+
return
|
261
|
+
for infered in assigned.infer(context):
|
262
|
+
yield infered
|
263
|
+
else:
|
264
|
+
raise InferenceError()
|
265
|
+
nodes.Subscript._infer = path_wrapper(infer_subscript)
|
266
|
+
nodes.Subscript.infer_lhs = raise_if_nothing_infered(infer_subscript)
|
267
|
+
|
268
|
+
|
269
|
+
UNARY_OP_METHOD = {'+': '__pos__',
|
270
|
+
'-': '__neg__',
|
271
|
+
'~': '__invert__',
|
272
|
+
'not': None, # XXX not '__nonzero__'
|
273
|
+
}
|
274
|
+
|
275
|
+
def infer_unaryop(self, context=None):
|
276
|
+
for operand in self.operand.infer(context):
|
277
|
+
try:
|
278
|
+
yield operand.infer_unary_op(self.op)
|
279
|
+
except TypeError:
|
280
|
+
continue
|
281
|
+
except AttributeError:
|
282
|
+
meth = UNARY_OP_METHOD[self.op]
|
283
|
+
if meth is None:
|
284
|
+
yield YES
|
285
|
+
else:
|
286
|
+
try:
|
287
|
+
# XXX just suppose if the type implement meth, returned type
|
288
|
+
# will be the same
|
289
|
+
operand.getattr(meth)
|
290
|
+
yield operand
|
291
|
+
except GeneratorExit:
|
292
|
+
raise
|
293
|
+
except:
|
294
|
+
yield YES
|
295
|
+
nodes.UnaryOp._infer = path_wrapper(infer_unaryop)
|
296
|
+
|
297
|
+
|
298
|
+
BIN_OP_METHOD = {'+': '__add__',
|
299
|
+
'-': '__sub__',
|
300
|
+
'/': '__div__',
|
301
|
+
'//': '__floordiv__',
|
302
|
+
'*': '__mul__',
|
303
|
+
'**': '__power__',
|
304
|
+
'%': '__mod__',
|
305
|
+
'&': '__and__',
|
306
|
+
'|': '__or__',
|
307
|
+
'^': '__xor__',
|
308
|
+
'<<': '__lshift__',
|
309
|
+
'>>': '__rshift__',
|
310
|
+
}
|
311
|
+
|
312
|
+
def _infer_binop(operator, operand1, operand2, context, failures=None):
|
313
|
+
if operand1 is YES:
|
314
|
+
yield operand1
|
315
|
+
return
|
316
|
+
try:
|
317
|
+
for valnode in operand1.infer_binary_op(operator, operand2, context):
|
318
|
+
yield valnode
|
319
|
+
except AttributeError:
|
320
|
+
try:
|
321
|
+
# XXX just suppose if the type implement meth, returned type
|
322
|
+
# will be the same
|
323
|
+
operand1.getattr(BIN_OP_METHOD[operator])
|
324
|
+
yield operand1
|
325
|
+
except:
|
326
|
+
if failures is None:
|
327
|
+
yield YES
|
328
|
+
else:
|
329
|
+
failures.append(operand1)
|
330
|
+
|
331
|
+
def infer_binop(self, context=None):
|
332
|
+
failures = []
|
333
|
+
for lhs in self.left.infer(context):
|
334
|
+
for val in _infer_binop(self.op, lhs, self.right, context, failures):
|
335
|
+
yield val
|
336
|
+
for lhs in failures:
|
337
|
+
for rhs in self.right.infer(context):
|
338
|
+
for val in _infer_binop(self.op, rhs, lhs, context):
|
339
|
+
yield val
|
340
|
+
nodes.BinOp._infer = path_wrapper(infer_binop)
|
341
|
+
|
342
|
+
|
343
|
+
def infer_arguments(self, context=None):
|
344
|
+
name = context.lookupname
|
345
|
+
if name is None:
|
346
|
+
raise InferenceError()
|
347
|
+
return _arguments_infer_argname(self, name, context)
|
348
|
+
nodes.Arguments._infer = infer_arguments
|
349
|
+
|
350
|
+
|
351
|
+
def infer_ass(self, context=None):
|
352
|
+
"""infer a AssName/AssAttr: need to inspect the RHS part of the
|
353
|
+
assign node
|
354
|
+
"""
|
355
|
+
stmt = self.statement()
|
356
|
+
if isinstance(stmt, nodes.AugAssign):
|
357
|
+
return stmt.infer(context)
|
358
|
+
stmts = list(self.assigned_stmts(context=context))
|
359
|
+
return _infer_stmts(stmts, context)
|
360
|
+
nodes.AssName._infer = path_wrapper(infer_ass)
|
361
|
+
nodes.AssAttr._infer = path_wrapper(infer_ass)
|
362
|
+
|
363
|
+
def infer_augassign(self, context=None):
|
364
|
+
failures = []
|
365
|
+
for lhs in self.target.infer_lhs(context):
|
366
|
+
for val in _infer_binop(self.op, lhs, self.value, context, failures):
|
367
|
+
yield val
|
368
|
+
for lhs in failures:
|
369
|
+
for rhs in self.value.infer(context):
|
370
|
+
for val in _infer_binop(self.op, rhs, lhs, context):
|
371
|
+
yield val
|
372
|
+
nodes.AugAssign._infer = path_wrapper(infer_augassign)
|
373
|
+
|
374
|
+
|
375
|
+
# no infer method on DelName and DelAttr (expected InferenceError)
|
376
|
+
|
377
|
+
|
378
|
+
def infer_empty_node(self, context=None):
|
379
|
+
if not self.has_underlying_object():
|
380
|
+
yield YES
|
381
|
+
else:
|
382
|
+
try:
|
383
|
+
for infered in MANAGER.infer_ast_from_something(self.object,
|
384
|
+
context=context):
|
385
|
+
yield infered
|
386
|
+
except AstroidError:
|
387
|
+
yield YES
|
388
|
+
nodes.EmptyNode._infer = path_wrapper(infer_empty_node)
|
389
|
+
|
390
|
+
|
391
|
+
def infer_index(self, context=None):
|
392
|
+
return self.value.infer(context)
|
393
|
+
nodes.Index._infer = infer_index
|