exercism-analysis 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
Astroid
|
|
2
|
+
=======
|
|
3
|
+
|
|
4
|
+
What's this?
|
|
5
|
+
------------
|
|
6
|
+
|
|
7
|
+
The aim of this module is to provide a common base representation of
|
|
8
|
+
python source code for projects such as pychecker, pyreverse,
|
|
9
|
+
pylint... Well, actually the development of this library is essentially
|
|
10
|
+
governed by pylint's needs. It used to be called logilab-astng.
|
|
11
|
+
|
|
12
|
+
It provides a compatible representation which comes from the `_ast`
|
|
13
|
+
module. It rebuilds the tree generated by the builtin _ast module by
|
|
14
|
+
recursively walking down the AST and building an extended ast. The new
|
|
15
|
+
node classes have additional methods and attributes for different
|
|
16
|
+
usages. They include some support for static inference and local name
|
|
17
|
+
scopes. Furthermore, astroid builds partial trees by inspecting living
|
|
18
|
+
objects.
|
|
19
|
+
|
|
20
|
+
Main modules are:
|
|
21
|
+
|
|
22
|
+
* `bases`, `node_classses` and `scoped_nodes` contain the classes for the
|
|
23
|
+
different type of nodes of the tree.
|
|
24
|
+
|
|
25
|
+
* the `manager` contains a high level object to get astroid trees from
|
|
26
|
+
source files and living objects. It maintains a cache of previously
|
|
27
|
+
constructed tree for quick access.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
Installation
|
|
31
|
+
------------
|
|
32
|
+
|
|
33
|
+
Extract the tarball, jump into the created directory and run::
|
|
34
|
+
|
|
35
|
+
python setup.py install
|
|
36
|
+
|
|
37
|
+
For installation options, see::
|
|
38
|
+
|
|
39
|
+
python setup.py install --help
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
If you have any questions, please mail the code-quality@python.org
|
|
43
|
+
mailing list for support. See
|
|
44
|
+
http://mail.python.org/mailman/listinfo/code-quality for subscription
|
|
45
|
+
information and archives. You may find older archives at
|
|
46
|
+
http://lists.logilab.org/mailman/listinfo/python-projects .
|
|
47
|
+
|
|
48
|
+
Test
|
|
49
|
+
----
|
|
50
|
+
|
|
51
|
+
Tests are in the 'test' subdirectory. To launch the whole tests suite
|
|
52
|
+
at once, you may use the 'pytest' utility from logilab-common (simply
|
|
53
|
+
type 'pytest' from within this directory) or if you're running python
|
|
54
|
+
>= 2.7, using discover, for instance::
|
|
55
|
+
|
|
56
|
+
python -m unittest discover -p "unittest*.py"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Python3
|
|
2
|
+
=======
|
|
3
|
+
|
|
4
|
+
Approach
|
|
5
|
+
--------
|
|
6
|
+
|
|
7
|
+
We maintain a Python 2 base and use 2to3 to generate Python 3 code.
|
|
8
|
+
|
|
9
|
+
2to3 is integrated into the distutils installation process and will be run as a
|
|
10
|
+
build step when invoked by the python3 interpreter::
|
|
11
|
+
|
|
12
|
+
python3 setup.py install --no-compile
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
Debian
|
|
16
|
+
------
|
|
17
|
+
|
|
18
|
+
For the Debian packaging, you can use the debian.py3k/ content against
|
|
19
|
+
the debian/ folder::
|
|
20
|
+
|
|
21
|
+
cp debian.py3k/* debian/
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
Resources
|
|
25
|
+
---------
|
|
26
|
+
http://wiki.python.org/moin/PortingPythonToPy3k
|
|
@@ -0,0 +1,118 @@
|
|
|
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
|
+
"""Python Abstract Syntax Tree New Generation
|
|
19
|
+
|
|
20
|
+
The aim of this module is to provide a common base representation of
|
|
21
|
+
python source code for projects such as pychecker, pyreverse,
|
|
22
|
+
pylint... Well, actually the development of this library is essentially
|
|
23
|
+
governed by pylint's needs.
|
|
24
|
+
|
|
25
|
+
It extends class defined in the python's _ast module with some
|
|
26
|
+
additional methods and attributes. Instance attributes are added by a
|
|
27
|
+
builder object, which can either generate extended ast (let's call
|
|
28
|
+
them astroid ;) by visiting an existent ast tree or by inspecting living
|
|
29
|
+
object. Methods are added by monkey patching ast classes.
|
|
30
|
+
|
|
31
|
+
Main modules are:
|
|
32
|
+
|
|
33
|
+
* nodes and scoped_nodes for more information about methods and
|
|
34
|
+
attributes added to different node classes
|
|
35
|
+
|
|
36
|
+
* the manager contains a high level object to get astroid trees from
|
|
37
|
+
source files and living objects. It maintains a cache of previously
|
|
38
|
+
constructed tree for quick access
|
|
39
|
+
|
|
40
|
+
* builder contains the class responsible to build astroid trees
|
|
41
|
+
"""
|
|
42
|
+
__doctype__ = "restructuredtext en"
|
|
43
|
+
|
|
44
|
+
import sys
|
|
45
|
+
import re
|
|
46
|
+
from operator import attrgetter
|
|
47
|
+
|
|
48
|
+
# WARNING: internal imports order matters !
|
|
49
|
+
|
|
50
|
+
# make all exception classes accessible from astroid package
|
|
51
|
+
from astroid.exceptions import *
|
|
52
|
+
|
|
53
|
+
# make all node classes accessible from astroid package
|
|
54
|
+
from astroid.nodes import *
|
|
55
|
+
|
|
56
|
+
# trigger extra monkey-patching
|
|
57
|
+
from astroid import inference
|
|
58
|
+
|
|
59
|
+
# more stuff available
|
|
60
|
+
from astroid import raw_building
|
|
61
|
+
from astroid.bases import YES, Instance, BoundMethod, UnboundMethod
|
|
62
|
+
from astroid.node_classes import are_exclusive, unpack_infer
|
|
63
|
+
from astroid.scoped_nodes import builtin_lookup
|
|
64
|
+
|
|
65
|
+
# make a manager instance (borg) as well as Project and Package classes
|
|
66
|
+
# accessible from astroid package
|
|
67
|
+
from astroid.manager import AstroidManager, Project
|
|
68
|
+
MANAGER = AstroidManager()
|
|
69
|
+
del AstroidManager
|
|
70
|
+
|
|
71
|
+
# transform utilities (filters and decorator)
|
|
72
|
+
|
|
73
|
+
class AsStringRegexpPredicate(object):
|
|
74
|
+
"""Class to be used as predicate that may be given to `register_transform`
|
|
75
|
+
|
|
76
|
+
First argument is a regular expression that will be searched against the `as_string`
|
|
77
|
+
representation of the node onto which it's applied.
|
|
78
|
+
|
|
79
|
+
If specified, the second argument is an `attrgetter` expression that will be
|
|
80
|
+
applied on the node first to get the actual node on which `as_string` should
|
|
81
|
+
be called.
|
|
82
|
+
"""
|
|
83
|
+
def __init__(self, regexp, expression=None):
|
|
84
|
+
self.regexp = re.compile(regexp)
|
|
85
|
+
self.expression = expression
|
|
86
|
+
|
|
87
|
+
def __call__(self, node):
|
|
88
|
+
if self.expression is not None:
|
|
89
|
+
node = attrgetter(self.expression)(node)
|
|
90
|
+
return self.regexp.search(node.as_string())
|
|
91
|
+
|
|
92
|
+
def inference_tip(infer_function):
|
|
93
|
+
"""Given an instance specific inference function, return a function to be
|
|
94
|
+
given to MANAGER.register_transform to set this inference function.
|
|
95
|
+
|
|
96
|
+
Typical usage
|
|
97
|
+
|
|
98
|
+
.. sourcecode:: python
|
|
99
|
+
|
|
100
|
+
MANAGER.register_transform(CallFunc, inference_tip(infer_named_tuple),
|
|
101
|
+
AsStringRegexpPredicate('namedtuple', 'func'))
|
|
102
|
+
"""
|
|
103
|
+
def transform(node, infer_function=infer_function):
|
|
104
|
+
node._explicit_inference = infer_function
|
|
105
|
+
return node
|
|
106
|
+
return transform
|
|
107
|
+
|
|
108
|
+
# load brain plugins
|
|
109
|
+
from os import listdir
|
|
110
|
+
from os.path import join, dirname
|
|
111
|
+
BRAIN_MODULES_DIR = join(dirname(__file__), 'brain')
|
|
112
|
+
if BRAIN_MODULES_DIR not in sys.path:
|
|
113
|
+
# add it to the end of the list so user path take precedence
|
|
114
|
+
sys.path.append(BRAIN_MODULES_DIR)
|
|
115
|
+
# load modules in this directory
|
|
116
|
+
for module in listdir(BRAIN_MODULES_DIR):
|
|
117
|
+
if module.endswith('.py'):
|
|
118
|
+
__import__(module[:-3])
|
|
Binary file
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
"""astroid packaging information"""
|
|
19
|
+
|
|
20
|
+
distname = 'astroid'
|
|
21
|
+
|
|
22
|
+
modname = 'astroid'
|
|
23
|
+
|
|
24
|
+
numversion = (1, 1, 1)
|
|
25
|
+
version = '.'.join([str(num) for num in numversion])
|
|
26
|
+
|
|
27
|
+
install_requires = ['logilab-common >= 0.60.0']
|
|
28
|
+
|
|
29
|
+
license = 'LGPL'
|
|
30
|
+
|
|
31
|
+
author = 'Logilab'
|
|
32
|
+
author_email = 'python-projects@lists.logilab.org'
|
|
33
|
+
mailinglist = "mailto://%s" % author_email
|
|
34
|
+
web = 'http://bitbucket.org/logilab/astroid'
|
|
35
|
+
|
|
36
|
+
description = "rebuild a new abstract syntax tree from Python's ast"
|
|
37
|
+
|
|
38
|
+
from os.path import join
|
|
39
|
+
include_dirs = ['brain',
|
|
40
|
+
join('test', 'regrtest_data'),
|
|
41
|
+
join('test', 'data'), join('test', 'data2')]
|
|
42
|
+
|
|
43
|
+
classifiers = ["Topic :: Software Development :: Libraries :: Python Modules",
|
|
44
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
45
|
+
"Programming Language :: Python",
|
|
46
|
+
"Programming Language :: Python :: 2",
|
|
47
|
+
"Programming Language :: Python :: 3",
|
|
48
|
+
]
|
|
Binary file
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
What's new ?
|
|
2
|
+
------------
|
|
3
|
+
%CHANGELOG%
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
What is %SOURCEPACKAGE% ?
|
|
7
|
+
------------------------
|
|
8
|
+
%LONG_DESC%
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Home page
|
|
12
|
+
---------
|
|
13
|
+
%WEB%
|
|
14
|
+
|
|
15
|
+
Download
|
|
16
|
+
--------
|
|
17
|
+
%FTP%
|
|
18
|
+
|
|
19
|
+
Mailing list
|
|
20
|
+
------------
|
|
21
|
+
%MAILINGLIST%
|
|
22
|
+
|
|
23
|
+
%ADDITIONAL_DESCR%
|
|
@@ -0,0 +1,496 @@
|
|
|
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 renders Astroid nodes as string:
|
|
19
|
+
|
|
20
|
+
* :func:`to_code` function return equivalent (hopefuly valid) python string
|
|
21
|
+
|
|
22
|
+
* :func:`dump` function return an internal representation of nodes found
|
|
23
|
+
in the tree, useful for debugging or understanding the tree structure
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
import sys
|
|
27
|
+
|
|
28
|
+
INDENT = ' ' # 4 spaces ; keep indentation variable
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def dump(node, ids=False):
|
|
32
|
+
"""print a nice astroid tree representation.
|
|
33
|
+
|
|
34
|
+
:param ids: if true, we also print the ids (usefull for debugging)
|
|
35
|
+
"""
|
|
36
|
+
result = []
|
|
37
|
+
_repr_tree(node, result, ids=ids)
|
|
38
|
+
return "\n".join(result)
|
|
39
|
+
|
|
40
|
+
def _repr_tree(node, result, indent='', _done=None, ids=False):
|
|
41
|
+
"""built a tree representation of a node as a list of lines"""
|
|
42
|
+
if _done is None:
|
|
43
|
+
_done = set()
|
|
44
|
+
if not hasattr(node, '_astroid_fields'): # not a astroid node
|
|
45
|
+
return
|
|
46
|
+
if node in _done:
|
|
47
|
+
result.append( indent + 'loop in tree: %s' % node )
|
|
48
|
+
return
|
|
49
|
+
_done.add(node)
|
|
50
|
+
node_str = str(node)
|
|
51
|
+
if ids:
|
|
52
|
+
node_str += ' . \t%x' % id(node)
|
|
53
|
+
result.append( indent + node_str )
|
|
54
|
+
indent += INDENT
|
|
55
|
+
for field in node._astroid_fields:
|
|
56
|
+
value = getattr(node, field)
|
|
57
|
+
if isinstance(value, (list, tuple) ):
|
|
58
|
+
result.append( indent + field + " = [" )
|
|
59
|
+
for child in value:
|
|
60
|
+
if isinstance(child, (list, tuple) ):
|
|
61
|
+
# special case for Dict # FIXME
|
|
62
|
+
_repr_tree(child[0], result, indent, _done, ids)
|
|
63
|
+
_repr_tree(child[1], result, indent, _done, ids)
|
|
64
|
+
result.append(indent + ',')
|
|
65
|
+
else:
|
|
66
|
+
_repr_tree(child, result, indent, _done, ids)
|
|
67
|
+
result.append( indent + "]" )
|
|
68
|
+
else:
|
|
69
|
+
result.append( indent + field + " = " )
|
|
70
|
+
_repr_tree(value, result, indent, _done, ids)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class AsStringVisitor(object):
|
|
74
|
+
"""Visitor to render an Astroid node as a valid python code string"""
|
|
75
|
+
|
|
76
|
+
def __call__(self, node):
|
|
77
|
+
"""Makes this visitor behave as a simple function"""
|
|
78
|
+
return node.accept(self)
|
|
79
|
+
|
|
80
|
+
def _stmt_list(self, stmts):
|
|
81
|
+
"""return a list of nodes to string"""
|
|
82
|
+
stmts = '\n'.join([nstr for nstr in [n.accept(self) for n in stmts] if nstr])
|
|
83
|
+
return INDENT + stmts.replace('\n', '\n'+INDENT)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## visit_<node> methods ###########################################
|
|
87
|
+
|
|
88
|
+
def visit_arguments(self, node):
|
|
89
|
+
"""return an astroid.Function node as string"""
|
|
90
|
+
return node.format_args()
|
|
91
|
+
|
|
92
|
+
def visit_assattr(self, node):
|
|
93
|
+
"""return an astroid.AssAttr node as string"""
|
|
94
|
+
return self.visit_getattr(node)
|
|
95
|
+
|
|
96
|
+
def visit_assert(self, node):
|
|
97
|
+
"""return an astroid.Assert node as string"""
|
|
98
|
+
if node.fail:
|
|
99
|
+
return 'assert %s, %s' % (node.test.accept(self),
|
|
100
|
+
node.fail.accept(self))
|
|
101
|
+
return 'assert %s' % node.test.accept(self)
|
|
102
|
+
|
|
103
|
+
def visit_assname(self, node):
|
|
104
|
+
"""return an astroid.AssName node as string"""
|
|
105
|
+
return node.name
|
|
106
|
+
|
|
107
|
+
def visit_assign(self, node):
|
|
108
|
+
"""return an astroid.Assign node as string"""
|
|
109
|
+
lhs = ' = '.join([n.accept(self) for n in node.targets])
|
|
110
|
+
return '%s = %s' % (lhs, node.value.accept(self))
|
|
111
|
+
|
|
112
|
+
def visit_augassign(self, node):
|
|
113
|
+
"""return an astroid.AugAssign node as string"""
|
|
114
|
+
return '%s %s %s' % (node.target.accept(self), node.op, node.value.accept(self))
|
|
115
|
+
|
|
116
|
+
def visit_backquote(self, node):
|
|
117
|
+
"""return an astroid.Backquote node as string"""
|
|
118
|
+
return '`%s`' % node.value.accept(self)
|
|
119
|
+
|
|
120
|
+
def visit_binop(self, node):
|
|
121
|
+
"""return an astroid.BinOp node as string"""
|
|
122
|
+
return '(%s) %s (%s)' % (node.left.accept(self), node.op, node.right.accept(self))
|
|
123
|
+
|
|
124
|
+
def visit_boolop(self, node):
|
|
125
|
+
"""return an astroid.BoolOp node as string"""
|
|
126
|
+
return (' %s ' % node.op).join(['(%s)' % n.accept(self)
|
|
127
|
+
for n in node.values])
|
|
128
|
+
|
|
129
|
+
def visit_break(self, node):
|
|
130
|
+
"""return an astroid.Break node as string"""
|
|
131
|
+
return 'break'
|
|
132
|
+
|
|
133
|
+
def visit_callfunc(self, node):
|
|
134
|
+
"""return an astroid.CallFunc node as string"""
|
|
135
|
+
expr_str = node.func.accept(self)
|
|
136
|
+
args = [arg.accept(self) for arg in node.args]
|
|
137
|
+
if node.starargs:
|
|
138
|
+
args.append( '*' + node.starargs.accept(self))
|
|
139
|
+
if node.kwargs:
|
|
140
|
+
args.append( '**' + node.kwargs.accept(self))
|
|
141
|
+
return '%s(%s)' % (expr_str, ', '.join(args))
|
|
142
|
+
|
|
143
|
+
def visit_class(self, node):
|
|
144
|
+
"""return an astroid.Class node as string"""
|
|
145
|
+
decorate = node.decorators and node.decorators.accept(self) or ''
|
|
146
|
+
bases = ', '.join([n.accept(self) for n in node.bases])
|
|
147
|
+
if sys.version_info[0] == 2:
|
|
148
|
+
bases = bases and '(%s)' % bases or ''
|
|
149
|
+
else:
|
|
150
|
+
metaclass = node.metaclass()
|
|
151
|
+
if metaclass:
|
|
152
|
+
if bases:
|
|
153
|
+
bases = '(%s, metaclass=%s)' % (bases, metaclass.name)
|
|
154
|
+
else:
|
|
155
|
+
bases = '(metaclass=%s)' % metaclass.name
|
|
156
|
+
else:
|
|
157
|
+
bases = bases and '(%s)' % bases or ''
|
|
158
|
+
docs = node.doc and '\n%s"""%s"""' % (INDENT, node.doc) or ''
|
|
159
|
+
return '\n\n%sclass %s%s:%s\n%s\n' % (decorate, node.name, bases, docs,
|
|
160
|
+
self._stmt_list( node.body))
|
|
161
|
+
|
|
162
|
+
def visit_compare(self, node):
|
|
163
|
+
"""return an astroid.Compare node as string"""
|
|
164
|
+
rhs_str = ' '.join(['%s %s' % (op, expr.accept(self))
|
|
165
|
+
for op, expr in node.ops])
|
|
166
|
+
return '%s %s' % (node.left.accept(self), rhs_str)
|
|
167
|
+
|
|
168
|
+
def visit_comprehension(self, node):
|
|
169
|
+
"""return an astroid.Comprehension node as string"""
|
|
170
|
+
ifs = ''.join([ ' if %s' % n.accept(self) for n in node.ifs])
|
|
171
|
+
return 'for %s in %s%s' % (node.target.accept(self),
|
|
172
|
+
node.iter.accept(self), ifs )
|
|
173
|
+
|
|
174
|
+
def visit_const(self, node):
|
|
175
|
+
"""return an astroid.Const node as string"""
|
|
176
|
+
return repr(node.value)
|
|
177
|
+
|
|
178
|
+
def visit_continue(self, node):
|
|
179
|
+
"""return an astroid.Continue node as string"""
|
|
180
|
+
return 'continue'
|
|
181
|
+
|
|
182
|
+
def visit_delete(self, node): # XXX check if correct
|
|
183
|
+
"""return an astroid.Delete node as string"""
|
|
184
|
+
return 'del %s' % ', '.join([child.accept(self)
|
|
185
|
+
for child in node.targets])
|
|
186
|
+
|
|
187
|
+
def visit_delattr(self, node):
|
|
188
|
+
"""return an astroid.DelAttr node as string"""
|
|
189
|
+
return self.visit_getattr(node)
|
|
190
|
+
|
|
191
|
+
def visit_delname(self, node):
|
|
192
|
+
"""return an astroid.DelName node as string"""
|
|
193
|
+
return node.name
|
|
194
|
+
|
|
195
|
+
def visit_decorators(self, node):
|
|
196
|
+
"""return an astroid.Decorators node as string"""
|
|
197
|
+
return '@%s\n' % '\n@'.join([item.accept(self) for item in node.nodes])
|
|
198
|
+
|
|
199
|
+
def visit_dict(self, node):
|
|
200
|
+
"""return an astroid.Dict node as string"""
|
|
201
|
+
return '{%s}' % ', '.join(['%s: %s' % (key.accept(self),
|
|
202
|
+
value.accept(self)) for key, value in node.items])
|
|
203
|
+
|
|
204
|
+
def visit_dictcomp(self, node):
|
|
205
|
+
"""return an astroid.DictComp node as string"""
|
|
206
|
+
return '{%s: %s %s}' % (node.key.accept(self), node.value.accept(self),
|
|
207
|
+
' '.join([n.accept(self) for n in node.generators]))
|
|
208
|
+
|
|
209
|
+
def visit_discard(self, node):
|
|
210
|
+
"""return an astroid.Discard node as string"""
|
|
211
|
+
return node.value.accept(self)
|
|
212
|
+
|
|
213
|
+
def visit_emptynode(self, node):
|
|
214
|
+
"""dummy method for visiting an Empty node"""
|
|
215
|
+
return ''
|
|
216
|
+
|
|
217
|
+
def visit_excepthandler(self, node):
|
|
218
|
+
if node.type:
|
|
219
|
+
if node.name:
|
|
220
|
+
excs = 'except %s, %s' % (node.type.accept(self),
|
|
221
|
+
node.name.accept(self))
|
|
222
|
+
else:
|
|
223
|
+
excs = 'except %s' % node.type.accept(self)
|
|
224
|
+
else:
|
|
225
|
+
excs = 'except'
|
|
226
|
+
return '%s:\n%s' % (excs, self._stmt_list(node.body))
|
|
227
|
+
|
|
228
|
+
def visit_ellipsis(self, node):
|
|
229
|
+
"""return an astroid.Ellipsis node as string"""
|
|
230
|
+
return '...'
|
|
231
|
+
|
|
232
|
+
def visit_empty(self, node):
|
|
233
|
+
"""return an Empty node as string"""
|
|
234
|
+
return ''
|
|
235
|
+
|
|
236
|
+
def visit_exec(self, node):
|
|
237
|
+
"""return an astroid.Exec node as string"""
|
|
238
|
+
if node.locals:
|
|
239
|
+
return 'exec %s in %s, %s' % (node.expr.accept(self),
|
|
240
|
+
node.locals.accept(self),
|
|
241
|
+
node.globals.accept(self))
|
|
242
|
+
if node.globals:
|
|
243
|
+
return 'exec %s in %s' % (node.expr.accept(self),
|
|
244
|
+
node.globals.accept(self))
|
|
245
|
+
return 'exec %s' % node.expr.accept(self)
|
|
246
|
+
|
|
247
|
+
def visit_extslice(self, node):
|
|
248
|
+
"""return an astroid.ExtSlice node as string"""
|
|
249
|
+
return ','.join( [dim.accept(self) for dim in node.dims] )
|
|
250
|
+
|
|
251
|
+
def visit_for(self, node):
|
|
252
|
+
"""return an astroid.For node as string"""
|
|
253
|
+
fors = 'for %s in %s:\n%s' % (node.target.accept(self),
|
|
254
|
+
node.iter.accept(self),
|
|
255
|
+
self._stmt_list( node.body))
|
|
256
|
+
if node.orelse:
|
|
257
|
+
fors = '%s\nelse:\n%s' % (fors, self._stmt_list(node.orelse))
|
|
258
|
+
return fors
|
|
259
|
+
|
|
260
|
+
def visit_from(self, node):
|
|
261
|
+
"""return an astroid.From node as string"""
|
|
262
|
+
return 'from %s import %s' % ('.' * (node.level or 0) + node.modname,
|
|
263
|
+
_import_string(node.names))
|
|
264
|
+
|
|
265
|
+
def visit_function(self, node):
|
|
266
|
+
"""return an astroid.Function node as string"""
|
|
267
|
+
decorate = node.decorators and node.decorators.accept(self) or ''
|
|
268
|
+
docs = node.doc and '\n%s"""%s"""' % (INDENT, node.doc) or ''
|
|
269
|
+
return '\n%sdef %s(%s):%s\n%s' % (decorate, node.name, node.args.accept(self),
|
|
270
|
+
docs, self._stmt_list(node.body))
|
|
271
|
+
|
|
272
|
+
def visit_genexpr(self, node):
|
|
273
|
+
"""return an astroid.GenExpr node as string"""
|
|
274
|
+
return '(%s %s)' % (node.elt.accept(self), ' '.join([n.accept(self)
|
|
275
|
+
for n in node.generators]))
|
|
276
|
+
|
|
277
|
+
def visit_getattr(self, node):
|
|
278
|
+
"""return an astroid.Getattr node as string"""
|
|
279
|
+
return '%s.%s' % (node.expr.accept(self), node.attrname)
|
|
280
|
+
|
|
281
|
+
def visit_global(self, node):
|
|
282
|
+
"""return an astroid.Global node as string"""
|
|
283
|
+
return 'global %s' % ', '.join(node.names)
|
|
284
|
+
|
|
285
|
+
def visit_if(self, node):
|
|
286
|
+
"""return an astroid.If node as string"""
|
|
287
|
+
ifs = ['if %s:\n%s' % (node.test.accept(self), self._stmt_list(node.body))]
|
|
288
|
+
if node.orelse:# XXX use elif ???
|
|
289
|
+
ifs.append('else:\n%s' % self._stmt_list(node.orelse))
|
|
290
|
+
return '\n'.join(ifs)
|
|
291
|
+
|
|
292
|
+
def visit_ifexp(self, node):
|
|
293
|
+
"""return an astroid.IfExp node as string"""
|
|
294
|
+
return '%s if %s else %s' % (node.body.accept(self),
|
|
295
|
+
node.test.accept(self), node.orelse.accept(self))
|
|
296
|
+
|
|
297
|
+
def visit_import(self, node):
|
|
298
|
+
"""return an astroid.Import node as string"""
|
|
299
|
+
return 'import %s' % _import_string(node.names)
|
|
300
|
+
|
|
301
|
+
def visit_keyword(self, node):
|
|
302
|
+
"""return an astroid.Keyword node as string"""
|
|
303
|
+
return '%s=%s' % (node.arg, node.value.accept(self))
|
|
304
|
+
|
|
305
|
+
def visit_lambda(self, node):
|
|
306
|
+
"""return an astroid.Lambda node as string"""
|
|
307
|
+
return 'lambda %s: %s' % (node.args.accept(self), node.body.accept(self))
|
|
308
|
+
|
|
309
|
+
def visit_list(self, node):
|
|
310
|
+
"""return an astroid.List node as string"""
|
|
311
|
+
return '[%s]' % ', '.join([child.accept(self) for child in node.elts])
|
|
312
|
+
|
|
313
|
+
def visit_listcomp(self, node):
|
|
314
|
+
"""return an astroid.ListComp node as string"""
|
|
315
|
+
return '[%s %s]' % (node.elt.accept(self), ' '.join([n.accept(self)
|
|
316
|
+
for n in node.generators]))
|
|
317
|
+
|
|
318
|
+
def visit_module(self, node):
|
|
319
|
+
"""return an astroid.Module node as string"""
|
|
320
|
+
docs = node.doc and '"""%s"""\n\n' % node.doc or ''
|
|
321
|
+
return docs + '\n'.join([n.accept(self) for n in node.body]) + '\n\n'
|
|
322
|
+
|
|
323
|
+
def visit_name(self, node):
|
|
324
|
+
"""return an astroid.Name node as string"""
|
|
325
|
+
return node.name
|
|
326
|
+
|
|
327
|
+
def visit_pass(self, node):
|
|
328
|
+
"""return an astroid.Pass node as string"""
|
|
329
|
+
return 'pass'
|
|
330
|
+
|
|
331
|
+
def visit_print(self, node):
|
|
332
|
+
"""return an astroid.Print node as string"""
|
|
333
|
+
nodes = ', '.join([n.accept(self) for n in node.values])
|
|
334
|
+
if not node.nl:
|
|
335
|
+
nodes = '%s,' % nodes
|
|
336
|
+
if node.dest:
|
|
337
|
+
return 'print >> %s, %s' % (node.dest.accept(self), nodes)
|
|
338
|
+
return 'print %s' % nodes
|
|
339
|
+
|
|
340
|
+
def visit_raise(self, node):
|
|
341
|
+
"""return an astroid.Raise node as string"""
|
|
342
|
+
if node.exc:
|
|
343
|
+
if node.inst:
|
|
344
|
+
if node.tback:
|
|
345
|
+
return 'raise %s, %s, %s' % (node.exc.accept(self),
|
|
346
|
+
node.inst.accept(self),
|
|
347
|
+
node.tback.accept(self))
|
|
348
|
+
return 'raise %s, %s' % (node.exc.accept(self),
|
|
349
|
+
node.inst.accept(self))
|
|
350
|
+
return 'raise %s' % node.exc.accept(self)
|
|
351
|
+
return 'raise'
|
|
352
|
+
|
|
353
|
+
def visit_return(self, node):
|
|
354
|
+
"""return an astroid.Return node as string"""
|
|
355
|
+
if node.value:
|
|
356
|
+
return 'return %s' % node.value.accept(self)
|
|
357
|
+
else:
|
|
358
|
+
return 'return'
|
|
359
|
+
|
|
360
|
+
def visit_index(self, node):
|
|
361
|
+
"""return a astroid.Index node as string"""
|
|
362
|
+
return node.value.accept(self)
|
|
363
|
+
|
|
364
|
+
def visit_set(self, node):
|
|
365
|
+
"""return an astroid.Set node as string"""
|
|
366
|
+
return '{%s}' % ', '.join([child.accept(self) for child in node.elts])
|
|
367
|
+
|
|
368
|
+
def visit_setcomp(self, node):
|
|
369
|
+
"""return an astroid.SetComp node as string"""
|
|
370
|
+
return '{%s %s}' % (node.elt.accept(self), ' '.join([n.accept(self)
|
|
371
|
+
for n in node.generators]))
|
|
372
|
+
|
|
373
|
+
def visit_slice(self, node):
|
|
374
|
+
"""return a astroid.Slice node as string"""
|
|
375
|
+
lower = node.lower and node.lower.accept(self) or ''
|
|
376
|
+
upper = node.upper and node.upper.accept(self) or ''
|
|
377
|
+
step = node.step and node.step.accept(self) or ''
|
|
378
|
+
if step:
|
|
379
|
+
return '%s:%s:%s' % (lower, upper, step)
|
|
380
|
+
return '%s:%s' % (lower, upper)
|
|
381
|
+
|
|
382
|
+
def visit_subscript(self, node):
|
|
383
|
+
"""return an astroid.Subscript node as string"""
|
|
384
|
+
return '%s[%s]' % (node.value.accept(self), node.slice.accept(self))
|
|
385
|
+
|
|
386
|
+
def visit_tryexcept(self, node):
|
|
387
|
+
"""return an astroid.TryExcept node as string"""
|
|
388
|
+
trys = ['try:\n%s' % self._stmt_list( node.body)]
|
|
389
|
+
for handler in node.handlers:
|
|
390
|
+
trys.append(handler.accept(self))
|
|
391
|
+
if node.orelse:
|
|
392
|
+
trys.append('else:\n%s' % self._stmt_list(node.orelse))
|
|
393
|
+
return '\n'.join(trys)
|
|
394
|
+
|
|
395
|
+
def visit_tryfinally(self, node):
|
|
396
|
+
"""return an astroid.TryFinally node as string"""
|
|
397
|
+
return 'try:\n%s\nfinally:\n%s' % (self._stmt_list( node.body),
|
|
398
|
+
self._stmt_list(node.finalbody))
|
|
399
|
+
|
|
400
|
+
def visit_tuple(self, node):
|
|
401
|
+
"""return an astroid.Tuple node as string"""
|
|
402
|
+
if len(node.elts) == 1:
|
|
403
|
+
return '(%s, )' % node.elts[0].accept(self)
|
|
404
|
+
return '(%s)' % ', '.join([child.accept(self) for child in node.elts])
|
|
405
|
+
|
|
406
|
+
def visit_unaryop(self, node):
|
|
407
|
+
"""return an astroid.UnaryOp node as string"""
|
|
408
|
+
if node.op == 'not':
|
|
409
|
+
operator = 'not '
|
|
410
|
+
else:
|
|
411
|
+
operator = node.op
|
|
412
|
+
return '%s%s' % (operator, node.operand.accept(self))
|
|
413
|
+
|
|
414
|
+
def visit_while(self, node):
|
|
415
|
+
"""return an astroid.While node as string"""
|
|
416
|
+
whiles = 'while %s:\n%s' % (node.test.accept(self),
|
|
417
|
+
self._stmt_list(node.body))
|
|
418
|
+
if node.orelse:
|
|
419
|
+
whiles = '%s\nelse:\n%s' % (whiles, self._stmt_list(node.orelse))
|
|
420
|
+
return whiles
|
|
421
|
+
|
|
422
|
+
def visit_with(self, node): # 'with' without 'as' is possible
|
|
423
|
+
"""return an astroid.With node as string"""
|
|
424
|
+
items = ', '.join(('(%s)' % expr.accept(self)) +
|
|
425
|
+
(vars and ' as (%s)' % (vars.accept(self)) or '')
|
|
426
|
+
for expr, vars in node.items)
|
|
427
|
+
return 'with %s:\n%s' % (items, self._stmt_list( node.body))
|
|
428
|
+
|
|
429
|
+
def visit_yield(self, node):
|
|
430
|
+
"""yield an ast.Yield node as string"""
|
|
431
|
+
yi_val = node.value and (" " + node.value.accept(self)) or ""
|
|
432
|
+
expr = 'yield' + yi_val
|
|
433
|
+
if node.parent.is_statement:
|
|
434
|
+
return expr
|
|
435
|
+
else:
|
|
436
|
+
return "(%s)" % (expr,)
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
class AsStringVisitor3k(AsStringVisitor):
|
|
440
|
+
"""AsStringVisitor3k overwrites some AsStringVisitor methods"""
|
|
441
|
+
|
|
442
|
+
def visit_excepthandler(self, node):
|
|
443
|
+
if node.type:
|
|
444
|
+
if node.name:
|
|
445
|
+
excs = 'except %s as %s' % (node.type.accept(self),
|
|
446
|
+
node.name.accept(self))
|
|
447
|
+
else:
|
|
448
|
+
excs = 'except %s' % node.type.accept(self)
|
|
449
|
+
else:
|
|
450
|
+
excs = 'except'
|
|
451
|
+
return '%s:\n%s' % (excs, self._stmt_list(node.body))
|
|
452
|
+
|
|
453
|
+
def visit_nonlocal(self, node):
|
|
454
|
+
"""return an astroid.Nonlocal node as string"""
|
|
455
|
+
return 'nonlocal %s' % ', '.join(node.names)
|
|
456
|
+
|
|
457
|
+
def visit_raise(self, node):
|
|
458
|
+
"""return an astroid.Raise node as string"""
|
|
459
|
+
if node.exc:
|
|
460
|
+
if node.cause:
|
|
461
|
+
return 'raise %s from %s' % (node.exc.accept(self),
|
|
462
|
+
node.cause.accept(self))
|
|
463
|
+
return 'raise %s' % node.exc.accept(self)
|
|
464
|
+
return 'raise'
|
|
465
|
+
|
|
466
|
+
def visit_starred(self, node):
|
|
467
|
+
"""return Starred node as string"""
|
|
468
|
+
return "*" + node.value.accept(self)
|
|
469
|
+
|
|
470
|
+
def visit_yieldfrom(self, node):
|
|
471
|
+
""" Return an astroid.YieldFrom node as string. """
|
|
472
|
+
yi_val = node.value and (" " + node.value.accept(self)) or ""
|
|
473
|
+
expr = 'yield from' + yi_val
|
|
474
|
+
if node.parent.is_statement:
|
|
475
|
+
return expr
|
|
476
|
+
else:
|
|
477
|
+
return "(%s)" % (expr,)
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
def _import_string(names):
|
|
481
|
+
"""return a list of (name, asname) formatted as a string"""
|
|
482
|
+
_names = []
|
|
483
|
+
for name, asname in names:
|
|
484
|
+
if asname is not None:
|
|
485
|
+
_names.append('%s as %s' % (name, asname))
|
|
486
|
+
else:
|
|
487
|
+
_names.append(name)
|
|
488
|
+
return ', '.join(_names)
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
if sys.version_info >= (3, 0):
|
|
492
|
+
AsStringVisitor = AsStringVisitor3k
|
|
493
|
+
|
|
494
|
+
# this visitor is stateless, thus it can be reused
|
|
495
|
+
to_code = AsStringVisitor()
|
|
496
|
+
|