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,73 @@
|
|
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
|
+
"""
|
19
|
+
on all nodes :
|
20
|
+
.is_statement, returning true if the node should be considered as a
|
21
|
+
statement node
|
22
|
+
.root(), returning the root node of the tree (i.e. a Module)
|
23
|
+
.previous_sibling(), returning previous sibling statement node
|
24
|
+
.next_sibling(), returning next sibling statement node
|
25
|
+
.statement(), returning the first parent node marked as statement node
|
26
|
+
.frame(), returning the first node defining a new local scope (i.e.
|
27
|
+
Module, Function or Class)
|
28
|
+
.set_local(name, node), define an identifier <name> on the first parent frame,
|
29
|
+
with the node defining it. This is used by the astroid builder and should not
|
30
|
+
be used from out there.
|
31
|
+
|
32
|
+
on From and Import :
|
33
|
+
.real_name(name),
|
34
|
+
|
35
|
+
|
36
|
+
"""
|
37
|
+
|
38
|
+
__docformat__ = "restructuredtext en"
|
39
|
+
|
40
|
+
from astroid.node_classes import Arguments, AssAttr, Assert, Assign, \
|
41
|
+
AssName, AugAssign, Backquote, BinOp, BoolOp, Break, CallFunc, Compare, \
|
42
|
+
Comprehension, Const, Continue, Decorators, DelAttr, DelName, Delete, \
|
43
|
+
Dict, Discard, Ellipsis, EmptyNode, ExceptHandler, Exec, ExtSlice, For, \
|
44
|
+
From, Getattr, Global, If, IfExp, Import, Index, Keyword, \
|
45
|
+
List, Name, Nonlocal, Pass, Print, Raise, Return, Set, Slice, Starred, Subscript, \
|
46
|
+
TryExcept, TryFinally, Tuple, UnaryOp, While, With, Yield, YieldFrom, \
|
47
|
+
const_factory
|
48
|
+
from astroid.scoped_nodes import Module, GenExpr, Lambda, DictComp, \
|
49
|
+
ListComp, SetComp, Function, Class
|
50
|
+
|
51
|
+
ALL_NODE_CLASSES = (
|
52
|
+
Arguments, AssAttr, Assert, Assign, AssName, AugAssign,
|
53
|
+
Backquote, BinOp, BoolOp, Break,
|
54
|
+
CallFunc, Class, Compare, Comprehension, Const, Continue,
|
55
|
+
Decorators, DelAttr, DelName, Delete,
|
56
|
+
Dict, DictComp, Discard,
|
57
|
+
Ellipsis, EmptyNode, ExceptHandler, Exec, ExtSlice,
|
58
|
+
For, From, Function,
|
59
|
+
Getattr, GenExpr, Global,
|
60
|
+
If, IfExp, Import, Index,
|
61
|
+
Keyword,
|
62
|
+
Lambda, List, ListComp,
|
63
|
+
Name, Nonlocal,
|
64
|
+
Module,
|
65
|
+
Pass, Print,
|
66
|
+
Raise, Return,
|
67
|
+
Set, SetComp, Slice, Starred, Subscript,
|
68
|
+
TryExcept, TryFinally, Tuple,
|
69
|
+
UnaryOp,
|
70
|
+
While, With,
|
71
|
+
Yield, YieldFrom
|
72
|
+
)
|
73
|
+
|
Binary file
|
@@ -0,0 +1,322 @@
|
|
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 python protocols for nodes
|
19
|
+
where it makes sense.
|
20
|
+
"""
|
21
|
+
|
22
|
+
__doctype__ = "restructuredtext en"
|
23
|
+
|
24
|
+
from astroid.exceptions import InferenceError, NoDefault
|
25
|
+
from astroid.node_classes import unpack_infer
|
26
|
+
from astroid.bases import copy_context, \
|
27
|
+
raise_if_nothing_infered, yes_if_nothing_infered, Instance, YES
|
28
|
+
from astroid.nodes import const_factory
|
29
|
+
from astroid import nodes
|
30
|
+
|
31
|
+
# unary operations ############################################################
|
32
|
+
|
33
|
+
def tl_infer_unary_op(self, operator):
|
34
|
+
if operator == 'not':
|
35
|
+
return const_factory(not bool(self.elts))
|
36
|
+
raise TypeError() # XXX log unsupported operation
|
37
|
+
nodes.Tuple.infer_unary_op = tl_infer_unary_op
|
38
|
+
nodes.List.infer_unary_op = tl_infer_unary_op
|
39
|
+
|
40
|
+
|
41
|
+
def dict_infer_unary_op(self, operator):
|
42
|
+
if operator == 'not':
|
43
|
+
return const_factory(not bool(self.items))
|
44
|
+
raise TypeError() # XXX log unsupported operation
|
45
|
+
nodes.Dict.infer_unary_op = dict_infer_unary_op
|
46
|
+
|
47
|
+
|
48
|
+
def const_infer_unary_op(self, operator):
|
49
|
+
if operator == 'not':
|
50
|
+
return const_factory(not self.value)
|
51
|
+
# XXX log potentially raised TypeError
|
52
|
+
elif operator == '+':
|
53
|
+
return const_factory(+self.value)
|
54
|
+
else: # operator == '-':
|
55
|
+
return const_factory(-self.value)
|
56
|
+
nodes.Const.infer_unary_op = const_infer_unary_op
|
57
|
+
|
58
|
+
|
59
|
+
# binary operations ###########################################################
|
60
|
+
|
61
|
+
BIN_OP_IMPL = {'+': lambda a, b: a + b,
|
62
|
+
'-': lambda a, b: a - b,
|
63
|
+
'/': lambda a, b: a / b,
|
64
|
+
'//': lambda a, b: a // b,
|
65
|
+
'*': lambda a, b: a * b,
|
66
|
+
'**': lambda a, b: a ** b,
|
67
|
+
'%': lambda a, b: a % b,
|
68
|
+
'&': lambda a, b: a & b,
|
69
|
+
'|': lambda a, b: a | b,
|
70
|
+
'^': lambda a, b: a ^ b,
|
71
|
+
'<<': lambda a, b: a << b,
|
72
|
+
'>>': lambda a, b: a >> b,
|
73
|
+
}
|
74
|
+
for key, impl in BIN_OP_IMPL.items():
|
75
|
+
BIN_OP_IMPL[key+'='] = impl
|
76
|
+
|
77
|
+
def const_infer_binary_op(self, operator, other, context):
|
78
|
+
for other in other.infer(context):
|
79
|
+
if isinstance(other, nodes.Const):
|
80
|
+
try:
|
81
|
+
impl = BIN_OP_IMPL[operator]
|
82
|
+
|
83
|
+
try:
|
84
|
+
yield const_factory(impl(self.value, other.value))
|
85
|
+
except Exception:
|
86
|
+
# ArithmeticError is not enough: float >> float is a TypeError
|
87
|
+
# TODO : let pylint know about the problem
|
88
|
+
pass
|
89
|
+
except TypeError:
|
90
|
+
# XXX log TypeError
|
91
|
+
continue
|
92
|
+
elif other is YES:
|
93
|
+
yield other
|
94
|
+
else:
|
95
|
+
try:
|
96
|
+
for val in other.infer_binary_op(operator, self, context):
|
97
|
+
yield val
|
98
|
+
except AttributeError:
|
99
|
+
yield YES
|
100
|
+
nodes.Const.infer_binary_op = yes_if_nothing_infered(const_infer_binary_op)
|
101
|
+
|
102
|
+
|
103
|
+
def tl_infer_binary_op(self, operator, other, context):
|
104
|
+
for other in other.infer(context):
|
105
|
+
if isinstance(other, self.__class__) and operator == '+':
|
106
|
+
node = self.__class__()
|
107
|
+
elts = [n for elt in self.elts for n in elt.infer(context)
|
108
|
+
if not n is YES]
|
109
|
+
elts += [n for elt in other.elts for n in elt.infer(context)
|
110
|
+
if not n is YES]
|
111
|
+
node.elts = elts
|
112
|
+
yield node
|
113
|
+
elif isinstance(other, nodes.Const) and operator == '*':
|
114
|
+
if not isinstance(other.value, int):
|
115
|
+
yield YES
|
116
|
+
continue
|
117
|
+
node = self.__class__()
|
118
|
+
elts = [n for elt in self.elts for n in elt.infer(context)
|
119
|
+
if not n is YES] * other.value
|
120
|
+
node.elts = elts
|
121
|
+
yield node
|
122
|
+
elif isinstance(other, Instance) and not isinstance(other, nodes.Const):
|
123
|
+
yield YES
|
124
|
+
# XXX else log TypeError
|
125
|
+
nodes.Tuple.infer_binary_op = yes_if_nothing_infered(tl_infer_binary_op)
|
126
|
+
nodes.List.infer_binary_op = yes_if_nothing_infered(tl_infer_binary_op)
|
127
|
+
|
128
|
+
|
129
|
+
def dict_infer_binary_op(self, operator, other, context):
|
130
|
+
for other in other.infer(context):
|
131
|
+
if isinstance(other, Instance) and isinstance(other._proxied, nodes.Class):
|
132
|
+
yield YES
|
133
|
+
# XXX else log TypeError
|
134
|
+
nodes.Dict.infer_binary_op = yes_if_nothing_infered(dict_infer_binary_op)
|
135
|
+
|
136
|
+
|
137
|
+
# assignment ##################################################################
|
138
|
+
|
139
|
+
"""the assigned_stmts method is responsible to return the assigned statement
|
140
|
+
(e.g. not inferred) according to the assignment type.
|
141
|
+
|
142
|
+
The `asspath` argument is used to record the lhs path of the original node.
|
143
|
+
For instance if we want assigned statements for 'c' in 'a, (b,c)', asspath
|
144
|
+
will be [1, 1] once arrived to the Assign node.
|
145
|
+
|
146
|
+
The `context` argument is the current inference context which should be given
|
147
|
+
to any intermediary inference necessary.
|
148
|
+
"""
|
149
|
+
|
150
|
+
def _resolve_looppart(parts, asspath, context):
|
151
|
+
"""recursive function to resolve multiple assignments on loops"""
|
152
|
+
asspath = asspath[:]
|
153
|
+
index = asspath.pop(0)
|
154
|
+
for part in parts:
|
155
|
+
if part is YES:
|
156
|
+
continue
|
157
|
+
# XXX handle __iter__ and log potentially detected errors
|
158
|
+
if not hasattr(part, 'itered'):
|
159
|
+
continue
|
160
|
+
try:
|
161
|
+
itered = part.itered()
|
162
|
+
except TypeError:
|
163
|
+
continue # XXX log error
|
164
|
+
for stmt in itered:
|
165
|
+
try:
|
166
|
+
assigned = stmt.getitem(index, context)
|
167
|
+
except (AttributeError, IndexError):
|
168
|
+
continue
|
169
|
+
except TypeError, exc: # stmt is unsubscriptable Const
|
170
|
+
continue
|
171
|
+
if not asspath:
|
172
|
+
# we achieved to resolved the assignment path,
|
173
|
+
# don't infer the last part
|
174
|
+
yield assigned
|
175
|
+
elif assigned is YES:
|
176
|
+
break
|
177
|
+
else:
|
178
|
+
# we are not yet on the last part of the path
|
179
|
+
# search on each possibly inferred value
|
180
|
+
try:
|
181
|
+
for infered in _resolve_looppart(assigned.infer(context),
|
182
|
+
asspath, context):
|
183
|
+
yield infered
|
184
|
+
except InferenceError:
|
185
|
+
break
|
186
|
+
|
187
|
+
|
188
|
+
def for_assigned_stmts(self, node, context=None, asspath=None):
|
189
|
+
if asspath is None:
|
190
|
+
for lst in self.iter.infer(context):
|
191
|
+
if isinstance(lst, (nodes.Tuple, nodes.List)):
|
192
|
+
for item in lst.elts:
|
193
|
+
yield item
|
194
|
+
else:
|
195
|
+
for infered in _resolve_looppart(self.iter.infer(context),
|
196
|
+
asspath, context):
|
197
|
+
yield infered
|
198
|
+
|
199
|
+
nodes.For.assigned_stmts = raise_if_nothing_infered(for_assigned_stmts)
|
200
|
+
nodes.Comprehension.assigned_stmts = raise_if_nothing_infered(for_assigned_stmts)
|
201
|
+
|
202
|
+
|
203
|
+
def mulass_assigned_stmts(self, node, context=None, asspath=None):
|
204
|
+
if asspath is None:
|
205
|
+
asspath = []
|
206
|
+
asspath.insert(0, self.elts.index(node))
|
207
|
+
return self.parent.assigned_stmts(self, context, asspath)
|
208
|
+
nodes.Tuple.assigned_stmts = mulass_assigned_stmts
|
209
|
+
nodes.List.assigned_stmts = mulass_assigned_stmts
|
210
|
+
|
211
|
+
|
212
|
+
def assend_assigned_stmts(self, context=None):
|
213
|
+
return self.parent.assigned_stmts(self, context=context)
|
214
|
+
nodes.AssName.assigned_stmts = assend_assigned_stmts
|
215
|
+
nodes.AssAttr.assigned_stmts = assend_assigned_stmts
|
216
|
+
|
217
|
+
|
218
|
+
def _arguments_infer_argname(self, name, context):
|
219
|
+
# arguments information may be missing, in which case we can't do anything
|
220
|
+
# more
|
221
|
+
if not (self.args or self.vararg or self.kwarg):
|
222
|
+
yield YES
|
223
|
+
return
|
224
|
+
# first argument of instance/class method
|
225
|
+
if self.args and getattr(self.args[0], 'name', None) == name:
|
226
|
+
functype = self.parent.type
|
227
|
+
if functype == 'method':
|
228
|
+
yield Instance(self.parent.parent.frame())
|
229
|
+
return
|
230
|
+
if functype == 'classmethod':
|
231
|
+
yield self.parent.parent.frame()
|
232
|
+
return
|
233
|
+
if name == self.vararg:
|
234
|
+
yield const_factory(())
|
235
|
+
return
|
236
|
+
if name == self.kwarg:
|
237
|
+
yield const_factory({})
|
238
|
+
return
|
239
|
+
# if there is a default value, yield it. And then yield YES to reflect
|
240
|
+
# we can't guess given argument value
|
241
|
+
try:
|
242
|
+
context = copy_context(context)
|
243
|
+
for infered in self.default_value(name).infer(context):
|
244
|
+
yield infered
|
245
|
+
yield YES
|
246
|
+
except NoDefault:
|
247
|
+
yield YES
|
248
|
+
|
249
|
+
|
250
|
+
def arguments_assigned_stmts(self, node, context, asspath=None):
|
251
|
+
if context.callcontext:
|
252
|
+
# reset call context/name
|
253
|
+
callcontext = context.callcontext
|
254
|
+
context = copy_context(context)
|
255
|
+
context.callcontext = None
|
256
|
+
for infered in callcontext.infer_argument(self.parent, node.name, context):
|
257
|
+
yield infered
|
258
|
+
return
|
259
|
+
for infered in _arguments_infer_argname(self, node.name, context):
|
260
|
+
yield infered
|
261
|
+
nodes.Arguments.assigned_stmts = arguments_assigned_stmts
|
262
|
+
|
263
|
+
|
264
|
+
def assign_assigned_stmts(self, node, context=None, asspath=None):
|
265
|
+
if not asspath:
|
266
|
+
yield self.value
|
267
|
+
return
|
268
|
+
for infered in _resolve_asspart(self.value.infer(context), asspath, context):
|
269
|
+
yield infered
|
270
|
+
nodes.Assign.assigned_stmts = raise_if_nothing_infered(assign_assigned_stmts)
|
271
|
+
nodes.AugAssign.assigned_stmts = raise_if_nothing_infered(assign_assigned_stmts)
|
272
|
+
|
273
|
+
|
274
|
+
def _resolve_asspart(parts, asspath, context):
|
275
|
+
"""recursive function to resolve multiple assignments"""
|
276
|
+
asspath = asspath[:]
|
277
|
+
index = asspath.pop(0)
|
278
|
+
for part in parts:
|
279
|
+
if hasattr(part, 'getitem'):
|
280
|
+
try:
|
281
|
+
assigned = part.getitem(index, context)
|
282
|
+
# XXX raise a specific exception to avoid potential hiding of
|
283
|
+
# unexpected exception ?
|
284
|
+
except (TypeError, IndexError):
|
285
|
+
return
|
286
|
+
if not asspath:
|
287
|
+
# we achieved to resolved the assignment path, don't infer the
|
288
|
+
# last part
|
289
|
+
yield assigned
|
290
|
+
elif assigned is YES:
|
291
|
+
return
|
292
|
+
else:
|
293
|
+
# we are not yet on the last part of the path search on each
|
294
|
+
# possibly inferred value
|
295
|
+
try:
|
296
|
+
for infered in _resolve_asspart(assigned.infer(context),
|
297
|
+
asspath, context):
|
298
|
+
yield infered
|
299
|
+
except InferenceError:
|
300
|
+
return
|
301
|
+
|
302
|
+
|
303
|
+
def excepthandler_assigned_stmts(self, node, context=None, asspath=None):
|
304
|
+
for assigned in unpack_infer(self.type):
|
305
|
+
if isinstance(assigned, nodes.Class):
|
306
|
+
assigned = Instance(assigned)
|
307
|
+
yield assigned
|
308
|
+
nodes.ExceptHandler.assigned_stmts = raise_if_nothing_infered(excepthandler_assigned_stmts)
|
309
|
+
|
310
|
+
|
311
|
+
def with_assigned_stmts(self, node, context=None, asspath=None):
|
312
|
+
if asspath is None:
|
313
|
+
for _, vars in self.items:
|
314
|
+
if vars is None:
|
315
|
+
continue
|
316
|
+
for lst in vars.infer(context):
|
317
|
+
if isinstance(lst, (nodes.Tuple, nodes.List)):
|
318
|
+
for item in lst.nodes:
|
319
|
+
yield item
|
320
|
+
nodes.With.assigned_stmts = raise_if_nothing_infered(with_assigned_stmts)
|
321
|
+
|
322
|
+
|
Binary file
|
@@ -0,0 +1,361 @@
|
|
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 create astroid trees from scratch
|
19
|
+
(build_* functions) or from living object (object_build_* functions)
|
20
|
+
"""
|
21
|
+
|
22
|
+
__docformat__ = "restructuredtext en"
|
23
|
+
|
24
|
+
import sys
|
25
|
+
from os.path import abspath
|
26
|
+
from inspect import (getargspec, isdatadescriptor, isfunction, ismethod,
|
27
|
+
ismethoddescriptor, isclass, isbuiltin, ismodule)
|
28
|
+
|
29
|
+
from astroid.node_classes import CONST_CLS
|
30
|
+
from astroid.nodes import (Module, Class, Const, const_factory, From,
|
31
|
+
Function, EmptyNode, Name, Arguments)
|
32
|
+
from astroid.bases import BUILTINS, Generator
|
33
|
+
from astroid.manager import AstroidManager
|
34
|
+
MANAGER = AstroidManager()
|
35
|
+
|
36
|
+
_CONSTANTS = tuple(CONST_CLS) # the keys of CONST_CLS eg python builtin types
|
37
|
+
|
38
|
+
def _io_discrepancy(member):
|
39
|
+
# _io module names itself `io`: http://bugs.python.org/issue18602
|
40
|
+
member_self = getattr(member, '__self__', None)
|
41
|
+
return (member_self and
|
42
|
+
ismodule(member_self) and
|
43
|
+
member_self.__name__ == '_io' and
|
44
|
+
member.__module__ == 'io')
|
45
|
+
|
46
|
+
def _attach_local_node(parent, node, name):
|
47
|
+
node.name = name # needed by add_local_node
|
48
|
+
parent.add_local_node(node)
|
49
|
+
|
50
|
+
_marker = object()
|
51
|
+
|
52
|
+
def attach_dummy_node(node, name, object=_marker):
|
53
|
+
"""create a dummy node and register it in the locals of the given
|
54
|
+
node with the specified name
|
55
|
+
"""
|
56
|
+
enode = EmptyNode()
|
57
|
+
enode.object = object
|
58
|
+
_attach_local_node(node, enode, name)
|
59
|
+
|
60
|
+
EmptyNode.has_underlying_object = lambda self: self.object is not _marker
|
61
|
+
|
62
|
+
def attach_const_node(node, name, value):
|
63
|
+
"""create a Const node and register it in the locals of the given
|
64
|
+
node with the specified name
|
65
|
+
"""
|
66
|
+
if not name in node.special_attributes:
|
67
|
+
_attach_local_node(node, const_factory(value), name)
|
68
|
+
|
69
|
+
def attach_import_node(node, modname, membername):
|
70
|
+
"""create a From node and register it in the locals of the given
|
71
|
+
node with the specified name
|
72
|
+
"""
|
73
|
+
from_node = From(modname, [(membername, None)])
|
74
|
+
_attach_local_node(node, from_node, membername)
|
75
|
+
|
76
|
+
|
77
|
+
def build_module(name, doc=None):
|
78
|
+
"""create and initialize a astroid Module node"""
|
79
|
+
node = Module(name, doc, pure_python=False)
|
80
|
+
node.package = False
|
81
|
+
node.parent = None
|
82
|
+
return node
|
83
|
+
|
84
|
+
def build_class(name, basenames=(), doc=None):
|
85
|
+
"""create and initialize a astroid Class node"""
|
86
|
+
node = Class(name, doc)
|
87
|
+
for base in basenames:
|
88
|
+
basenode = Name()
|
89
|
+
basenode.name = base
|
90
|
+
node.bases.append(basenode)
|
91
|
+
basenode.parent = node
|
92
|
+
return node
|
93
|
+
|
94
|
+
def build_function(name, args=None, defaults=None, flag=0, doc=None):
|
95
|
+
"""create and initialize a astroid Function node"""
|
96
|
+
args, defaults = args or [], defaults or []
|
97
|
+
# first argument is now a list of decorators
|
98
|
+
func = Function(name, doc)
|
99
|
+
func.args = argsnode = Arguments()
|
100
|
+
argsnode.args = []
|
101
|
+
for arg in args:
|
102
|
+
argsnode.args.append(Name())
|
103
|
+
argsnode.args[-1].name = arg
|
104
|
+
argsnode.args[-1].parent = argsnode
|
105
|
+
argsnode.defaults = []
|
106
|
+
for default in defaults:
|
107
|
+
argsnode.defaults.append(const_factory(default))
|
108
|
+
argsnode.defaults[-1].parent = argsnode
|
109
|
+
argsnode.kwarg = None
|
110
|
+
argsnode.vararg = None
|
111
|
+
argsnode.parent = func
|
112
|
+
if args:
|
113
|
+
register_arguments(func)
|
114
|
+
return func
|
115
|
+
|
116
|
+
|
117
|
+
def build_from_import(fromname, names):
|
118
|
+
"""create and initialize an astroid From import statement"""
|
119
|
+
return From(fromname, [(name, None) for name in names])
|
120
|
+
|
121
|
+
def register_arguments(func, args=None):
|
122
|
+
"""add given arguments to local
|
123
|
+
|
124
|
+
args is a list that may contains nested lists
|
125
|
+
(i.e. def func(a, (b, c, d)): ...)
|
126
|
+
"""
|
127
|
+
if args is None:
|
128
|
+
args = func.args.args
|
129
|
+
if func.args.vararg:
|
130
|
+
func.set_local(func.args.vararg, func.args)
|
131
|
+
if func.args.kwarg:
|
132
|
+
func.set_local(func.args.kwarg, func.args)
|
133
|
+
for arg in args:
|
134
|
+
if isinstance(arg, Name):
|
135
|
+
func.set_local(arg.name, arg)
|
136
|
+
else:
|
137
|
+
register_arguments(func, arg.elts)
|
138
|
+
|
139
|
+
def object_build_class(node, member, localname):
|
140
|
+
"""create astroid for a living class object"""
|
141
|
+
basenames = [base.__name__ for base in member.__bases__]
|
142
|
+
return _base_class_object_build(node, member, basenames,
|
143
|
+
localname=localname)
|
144
|
+
|
145
|
+
def object_build_function(node, member, localname):
|
146
|
+
"""create astroid for a living function object"""
|
147
|
+
args, varargs, varkw, defaults = getargspec(member)
|
148
|
+
if varargs is not None:
|
149
|
+
args.append(varargs)
|
150
|
+
if varkw is not None:
|
151
|
+
args.append(varkw)
|
152
|
+
func = build_function(getattr(member, '__name__', None) or localname, args,
|
153
|
+
defaults, member.func_code.co_flags, member.__doc__)
|
154
|
+
node.add_local_node(func, localname)
|
155
|
+
|
156
|
+
def object_build_datadescriptor(node, member, name):
|
157
|
+
"""create astroid for a living data descriptor object"""
|
158
|
+
return _base_class_object_build(node, member, [], name)
|
159
|
+
|
160
|
+
def object_build_methoddescriptor(node, member, localname):
|
161
|
+
"""create astroid for a living method descriptor object"""
|
162
|
+
# FIXME get arguments ?
|
163
|
+
func = build_function(getattr(member, '__name__', None) or localname,
|
164
|
+
doc=member.__doc__)
|
165
|
+
# set node's arguments to None to notice that we have no information, not
|
166
|
+
# and empty argument list
|
167
|
+
func.args.args = None
|
168
|
+
node.add_local_node(func, localname)
|
169
|
+
|
170
|
+
def _base_class_object_build(node, member, basenames, name=None, localname=None):
|
171
|
+
"""create astroid for a living class object, with a given set of base names
|
172
|
+
(e.g. ancestors)
|
173
|
+
"""
|
174
|
+
klass = build_class(name or getattr(member, '__name__', None) or localname,
|
175
|
+
basenames, member.__doc__)
|
176
|
+
klass._newstyle = isinstance(member, type)
|
177
|
+
node.add_local_node(klass, localname)
|
178
|
+
try:
|
179
|
+
# limit the instantiation trick since it's too dangerous
|
180
|
+
# (such as infinite test execution...)
|
181
|
+
# this at least resolves common case such as Exception.args,
|
182
|
+
# OSError.errno
|
183
|
+
if issubclass(member, Exception):
|
184
|
+
instdict = member().__dict__
|
185
|
+
else:
|
186
|
+
raise TypeError
|
187
|
+
except:
|
188
|
+
pass
|
189
|
+
else:
|
190
|
+
for name, obj in instdict.items():
|
191
|
+
valnode = EmptyNode()
|
192
|
+
valnode.object = obj
|
193
|
+
valnode.parent = klass
|
194
|
+
valnode.lineno = 1
|
195
|
+
klass.instance_attrs[name] = [valnode]
|
196
|
+
return klass
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
class InspectBuilder(object):
|
202
|
+
"""class for building nodes from living object
|
203
|
+
|
204
|
+
this is actually a really minimal representation, including only Module,
|
205
|
+
Function and Class nodes and some others as guessed.
|
206
|
+
"""
|
207
|
+
|
208
|
+
# astroid from living objects ###############################################
|
209
|
+
|
210
|
+
def __init__(self):
|
211
|
+
self._done = {}
|
212
|
+
self._module = None
|
213
|
+
|
214
|
+
def inspect_build(self, module, modname=None, path=None):
|
215
|
+
"""build astroid from a living module (i.e. using inspect)
|
216
|
+
this is used when there is no python source code available (either
|
217
|
+
because it's a built-in module or because the .py is not available)
|
218
|
+
"""
|
219
|
+
self._module = module
|
220
|
+
if modname is None:
|
221
|
+
modname = module.__name__
|
222
|
+
try:
|
223
|
+
node = build_module(modname, module.__doc__)
|
224
|
+
except AttributeError:
|
225
|
+
# in jython, java modules have no __doc__ (see #109562)
|
226
|
+
node = build_module(modname)
|
227
|
+
node.file = node.path = path and abspath(path) or path
|
228
|
+
node.name = modname
|
229
|
+
MANAGER.cache_module(node)
|
230
|
+
node.package = hasattr(module, '__path__')
|
231
|
+
self._done = {}
|
232
|
+
self.object_build(node, module)
|
233
|
+
return node
|
234
|
+
|
235
|
+
def object_build(self, node, obj):
|
236
|
+
"""recursive method which create a partial ast from real objects
|
237
|
+
(only function, class, and method are handled)
|
238
|
+
"""
|
239
|
+
if obj in self._done:
|
240
|
+
return self._done[obj]
|
241
|
+
self._done[obj] = node
|
242
|
+
for name in dir(obj):
|
243
|
+
try:
|
244
|
+
member = getattr(obj, name)
|
245
|
+
except AttributeError:
|
246
|
+
# damned ExtensionClass.Base, I know you're there !
|
247
|
+
attach_dummy_node(node, name)
|
248
|
+
continue
|
249
|
+
if ismethod(member):
|
250
|
+
member = member.im_func
|
251
|
+
if isfunction(member):
|
252
|
+
# verify this is not an imported function
|
253
|
+
filename = getattr(member.func_code, 'co_filename', None)
|
254
|
+
if filename is None:
|
255
|
+
assert isinstance(member, object)
|
256
|
+
object_build_methoddescriptor(node, member, name)
|
257
|
+
elif filename != getattr(self._module, '__file__', None):
|
258
|
+
attach_dummy_node(node, name, member)
|
259
|
+
else:
|
260
|
+
object_build_function(node, member, name)
|
261
|
+
elif isbuiltin(member):
|
262
|
+
if (not _io_discrepancy(member) and
|
263
|
+
self.imported_member(node, member, name)):
|
264
|
+
#if obj is object:
|
265
|
+
# print 'skippp', obj, name, member
|
266
|
+
continue
|
267
|
+
object_build_methoddescriptor(node, member, name)
|
268
|
+
elif isclass(member):
|
269
|
+
if self.imported_member(node, member, name):
|
270
|
+
continue
|
271
|
+
if member in self._done:
|
272
|
+
class_node = self._done[member]
|
273
|
+
if not class_node in node.locals.get(name, ()):
|
274
|
+
node.add_local_node(class_node, name)
|
275
|
+
else:
|
276
|
+
class_node = object_build_class(node, member, name)
|
277
|
+
# recursion
|
278
|
+
self.object_build(class_node, member)
|
279
|
+
if name == '__class__' and class_node.parent is None:
|
280
|
+
class_node.parent = self._done[self._module]
|
281
|
+
elif ismethoddescriptor(member):
|
282
|
+
assert isinstance(member, object)
|
283
|
+
object_build_methoddescriptor(node, member, name)
|
284
|
+
elif isdatadescriptor(member):
|
285
|
+
assert isinstance(member, object)
|
286
|
+
object_build_datadescriptor(node, member, name)
|
287
|
+
elif type(member) in _CONSTANTS:
|
288
|
+
attach_const_node(node, name, member)
|
289
|
+
else:
|
290
|
+
# create an empty node so that the name is actually defined
|
291
|
+
attach_dummy_node(node, name, member)
|
292
|
+
|
293
|
+
def imported_member(self, node, member, name):
|
294
|
+
"""verify this is not an imported class or handle it"""
|
295
|
+
# /!\ some classes like ExtensionClass doesn't have a __module__
|
296
|
+
# attribute ! Also, this may trigger an exception on badly built module
|
297
|
+
# (see http://www.logilab.org/ticket/57299 for instance)
|
298
|
+
try:
|
299
|
+
modname = getattr(member, '__module__', None)
|
300
|
+
except:
|
301
|
+
# XXX use logging
|
302
|
+
print 'unexpected error while building astroid from living object'
|
303
|
+
import traceback
|
304
|
+
traceback.print_exc()
|
305
|
+
modname = None
|
306
|
+
if modname is None:
|
307
|
+
if name in ('__new__', '__subclasshook__'):
|
308
|
+
# Python 2.5.1 (r251:54863, Sep 1 2010, 22:03:14)
|
309
|
+
# >>> print object.__new__.__module__
|
310
|
+
# None
|
311
|
+
modname = BUILTINS
|
312
|
+
else:
|
313
|
+
attach_dummy_node(node, name, member)
|
314
|
+
return True
|
315
|
+
if {'gtk': 'gtk._gtk'}.get(modname, modname) != self._module.__name__:
|
316
|
+
# check if it sounds valid and then add an import node, else use a
|
317
|
+
# dummy node
|
318
|
+
try:
|
319
|
+
getattr(sys.modules[modname], name)
|
320
|
+
except (KeyError, AttributeError):
|
321
|
+
attach_dummy_node(node, name, member)
|
322
|
+
else:
|
323
|
+
attach_import_node(node, modname, name)
|
324
|
+
return True
|
325
|
+
return False
|
326
|
+
|
327
|
+
|
328
|
+
### astroid boot strapping ################################################### ###
|
329
|
+
Astroid_BUILDER = InspectBuilder()
|
330
|
+
|
331
|
+
_CONST_PROXY = {}
|
332
|
+
def astroid_boot_strapping():
|
333
|
+
"""astroid boot strapping the builtins module"""
|
334
|
+
# this boot strapping is necessary since we need the Const nodes to
|
335
|
+
# inspect_build builtins, and then we can proxy Const
|
336
|
+
from logilab.common.compat import builtins
|
337
|
+
astroid_builtin = Astroid_BUILDER.inspect_build(builtins)
|
338
|
+
for cls, node_cls in CONST_CLS.items():
|
339
|
+
if cls is type(None):
|
340
|
+
proxy = build_class('NoneType')
|
341
|
+
proxy.parent = astroid_builtin
|
342
|
+
else:
|
343
|
+
proxy = astroid_builtin.getattr(cls.__name__)[0]
|
344
|
+
if cls in (dict, list, set, tuple):
|
345
|
+
node_cls._proxied = proxy
|
346
|
+
else:
|
347
|
+
_CONST_PROXY[cls] = proxy
|
348
|
+
|
349
|
+
astroid_boot_strapping()
|
350
|
+
|
351
|
+
# TODO : find a nicer way to handle this situation;
|
352
|
+
# However __proxied introduced an
|
353
|
+
# infinite recursion (see https://bugs.launchpad.net/pylint/+bug/456870)
|
354
|
+
def _set_proxied(const):
|
355
|
+
return _CONST_PROXY[const.value.__class__]
|
356
|
+
Const._proxied = property(_set_proxied)
|
357
|
+
|
358
|
+
from types import GeneratorType
|
359
|
+
Generator._proxied = Class(GeneratorType.__name__, GeneratorType.__doc__)
|
360
|
+
Astroid_BUILDER.object_build(Generator._proxied, GeneratorType)
|
361
|
+
|