├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE.txt ├── README.rst ├── blackmamba ├── __init__.py ├── bundle.py ├── config.py ├── framework │ └── security.py ├── ide │ ├── __init__.py │ ├── action.py │ ├── annotation.py │ ├── bookmark.py │ ├── refactoring.py │ ├── script.py │ ├── source.py │ ├── tab.py │ └── theme.py ├── lib │ ├── docutils-0.14.dist-info │ │ ├── DESCRIPTION.rst │ │ ├── INSTALLER │ │ ├── METADATA │ │ ├── RECORD │ │ ├── WHEEL │ │ ├── metadata.json │ │ └── top_level.txt │ ├── docutils │ │ ├── __init__.py │ │ ├── _compat.py │ │ ├── core.py │ │ ├── examples.py │ │ ├── frontend.py │ │ ├── io.py │ │ ├── languages │ │ │ ├── __init__.py │ │ │ ├── af.py │ │ │ ├── ca.py │ │ │ ├── cs.py │ │ │ ├── da.py │ │ │ ├── de.py │ │ │ ├── en.py │ │ │ ├── eo.py │ │ │ ├── es.py │ │ │ ├── fa.py │ │ │ ├── fi.py │ │ │ ├── fr.py │ │ │ ├── gl.py │ │ │ ├── he.py │ │ │ ├── it.py │ │ │ ├── ja.py │ │ │ ├── lt.py │ │ │ ├── lv.py │ │ │ ├── nl.py │ │ │ ├── pl.py │ │ │ ├── pt_br.py │ │ │ ├── ru.py │ │ │ ├── sk.py │ │ │ ├── sv.py │ │ │ ├── zh_cn.py │ │ │ └── zh_tw.py │ │ ├── nodes.py │ │ ├── parsers │ │ │ ├── __init__.py │ │ │ ├── null.py │ │ │ └── rst │ │ │ │ ├── __init__.py │ │ │ │ ├── directives │ │ │ │ ├── __init__.py │ │ │ │ ├── admonitions.py │ │ │ │ ├── body.py │ │ │ │ ├── html.py │ │ │ │ ├── images.py │ │ │ │ ├── misc.py │ │ │ │ ├── parts.py │ │ │ │ ├── references.py │ │ │ │ └── tables.py │ │ │ │ ├── include │ │ │ │ ├── README.txt │ │ │ │ ├── isoamsa.txt │ │ │ │ ├── isoamsb.txt │ │ │ │ ├── isoamsc.txt │ │ │ │ ├── isoamsn.txt │ │ │ │ ├── isoamso.txt │ │ │ │ ├── isoamsr.txt │ │ │ │ ├── isobox.txt │ │ │ │ ├── isocyr1.txt │ │ │ │ ├── isocyr2.txt │ │ │ │ ├── isodia.txt │ │ │ │ ├── isogrk1.txt │ │ │ │ ├── isogrk2.txt │ │ │ │ ├── isogrk3.txt │ │ │ │ ├── isogrk4-wide.txt │ │ │ │ ├── isogrk4.txt │ │ │ │ ├── isolat1.txt │ │ │ │ ├── isolat2.txt │ │ │ │ ├── isomfrk-wide.txt │ │ │ │ ├── isomfrk.txt │ │ │ │ ├── isomopf-wide.txt │ │ │ │ ├── isomopf.txt │ │ │ │ ├── isomscr-wide.txt │ │ │ │ ├── isomscr.txt │ │ │ │ ├── isonum.txt │ │ │ │ ├── isopub.txt │ │ │ │ ├── isotech.txt │ │ │ │ ├── mmlalias.txt │ │ │ │ ├── mmlextra-wide.txt │ │ │ │ ├── mmlextra.txt │ │ │ │ ├── s5defs.txt │ │ │ │ ├── xhtml1-lat1.txt │ │ │ │ ├── xhtml1-special.txt │ │ │ │ └── xhtml1-symbol.txt │ │ │ │ ├── languages │ │ │ │ ├── __init__.py │ │ │ │ ├── af.py │ │ │ │ ├── ca.py │ │ │ │ ├── cs.py │ │ │ │ ├── da.py │ │ │ │ ├── de.py │ │ │ │ ├── en.py │ │ │ │ ├── eo.py │ │ │ │ ├── es.py │ │ │ │ ├── fa.py │ │ │ │ ├── fi.py │ │ │ │ ├── fr.py │ │ │ │ ├── gl.py │ │ │ │ ├── he.py │ │ │ │ ├── it.py │ │ │ │ ├── ja.py │ │ │ │ ├── lt.py │ │ │ │ ├── lv.py │ │ │ │ ├── nl.py │ │ │ │ ├── pl.py │ │ │ │ ├── pt_br.py │ │ │ │ ├── ru.py │ │ │ │ ├── sk.py │ │ │ │ ├── sv.py │ │ │ │ ├── zh_cn.py │ │ │ │ └── zh_tw.py │ │ │ │ ├── roles.py │ │ │ │ ├── states.py │ │ │ │ └── tableparser.py │ │ ├── readers │ │ │ ├── __init__.py │ │ │ ├── doctree.py │ │ │ ├── pep.py │ │ │ └── standalone.py │ │ ├── statemachine.py │ │ ├── transforms │ │ │ ├── __init__.py │ │ │ ├── components.py │ │ │ ├── frontmatter.py │ │ │ ├── misc.py │ │ │ ├── parts.py │ │ │ ├── peps.py │ │ │ ├── references.py │ │ │ ├── universal.py │ │ │ └── writer_aux.py │ │ ├── utils │ │ │ ├── __init__.py │ │ │ ├── code_analyzer.py │ │ │ ├── error_reporting.py │ │ │ ├── math │ │ │ │ ├── __init__.py │ │ │ │ ├── latex2mathml.py │ │ │ │ ├── math2html.py │ │ │ │ ├── tex2mathml_extern.py │ │ │ │ ├── tex2unichar.py │ │ │ │ └── unichar2tex.py │ │ │ ├── punctuation_chars.py │ │ │ ├── roman.py │ │ │ ├── smartquotes.py │ │ │ └── urischemes.py │ │ └── writers │ │ │ ├── __init__.py │ │ │ ├── _html_base.py │ │ │ ├── docutils_xml.py │ │ │ ├── html4css1 │ │ │ ├── __init__.py │ │ │ ├── html4css1.css │ │ │ └── template.txt │ │ │ ├── html5_polyglot │ │ │ ├── __init__.py │ │ │ ├── math.css │ │ │ ├── minimal.css │ │ │ ├── plain.css │ │ │ └── template.txt │ │ │ ├── latex2e │ │ │ ├── __init__.py │ │ │ ├── default.tex │ │ │ ├── titlepage.tex │ │ │ └── xelatex.tex │ │ │ ├── manpage.py │ │ │ ├── null.py │ │ │ ├── odf_odt │ │ │ ├── __init__.py │ │ │ ├── pygmentsformatter.py │ │ │ └── styles.odt │ │ │ ├── pep_html │ │ │ ├── __init__.py │ │ │ ├── pep.css │ │ │ └── template.txt │ │ │ ├── pseudoxml.py │ │ │ ├── s5_html │ │ │ ├── __init__.py │ │ │ └── themes │ │ │ │ ├── README.txt │ │ │ │ ├── big-black │ │ │ │ ├── __base__ │ │ │ │ ├── framing.css │ │ │ │ └── pretty.css │ │ │ │ ├── big-white │ │ │ │ ├── framing.css │ │ │ │ └── pretty.css │ │ │ │ ├── default │ │ │ │ ├── blank.gif │ │ │ │ ├── framing.css │ │ │ │ ├── iepngfix.htc │ │ │ │ ├── opera.css │ │ │ │ ├── outline.css │ │ │ │ ├── pretty.css │ │ │ │ ├── print.css │ │ │ │ ├── s5-core.css │ │ │ │ ├── slides.css │ │ │ │ └── slides.js │ │ │ │ ├── medium-black │ │ │ │ ├── __base__ │ │ │ │ └── pretty.css │ │ │ │ ├── medium-white │ │ │ │ ├── framing.css │ │ │ │ └── pretty.css │ │ │ │ ├── small-black │ │ │ │ ├── __base__ │ │ │ │ └── pretty.css │ │ │ │ └── small-white │ │ │ │ ├── framing.css │ │ │ │ └── pretty.css │ │ │ └── xetex │ │ │ └── __init__.py │ ├── flake8-3.5.0.dist-info │ │ ├── DESCRIPTION.rst │ │ ├── INSTALLER │ │ ├── METADATA │ │ ├── RECORD │ │ ├── WHEEL │ │ ├── entry_points.txt │ │ ├── metadata.json │ │ └── top_level.txt │ ├── flake8 │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── api │ │ │ ├── __init__.py │ │ │ └── legacy.py │ │ ├── checker.py │ │ ├── defaults.py │ │ ├── exceptions.py │ │ ├── formatting │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ └── default.py │ │ ├── main │ │ │ ├── __init__.py │ │ │ ├── application.py │ │ │ ├── cli.py │ │ │ ├── debug.py │ │ │ ├── git.py │ │ │ ├── mercurial.py │ │ │ ├── options.py │ │ │ ├── setuptools_command.py │ │ │ └── vcs.py │ │ ├── options │ │ │ ├── __init__.py │ │ │ ├── aggregator.py │ │ │ ├── config.py │ │ │ └── manager.py │ │ ├── plugins │ │ │ ├── __init__.py │ │ │ ├── _trie.py │ │ │ ├── manager.py │ │ │ ├── notifier.py │ │ │ └── pyflakes.py │ │ ├── processor.py │ │ ├── statistics.py │ │ ├── style_guide.py │ │ └── utils.py │ ├── future-0.16.0.dist-info │ │ ├── DESCRIPTION.rst │ │ ├── INSTALLER │ │ ├── METADATA │ │ ├── RECORD │ │ ├── WHEEL │ │ ├── entry_points.txt │ │ ├── metadata.json │ │ └── top_level.txt │ ├── future │ │ ├── __init__.py │ │ ├── backports │ │ │ ├── __init__.py │ │ │ ├── _markupbase.py │ │ │ ├── datetime.py │ │ │ ├── email │ │ │ │ ├── __init__.py │ │ │ │ ├── _encoded_words.py │ │ │ │ ├── _header_value_parser.py │ │ │ │ ├── _parseaddr.py │ │ │ │ ├── _policybase.py │ │ │ │ ├── base64mime.py │ │ │ │ ├── charset.py │ │ │ │ ├── encoders.py │ │ │ │ ├── errors.py │ │ │ │ ├── feedparser.py │ │ │ │ ├── generator.py │ │ │ │ ├── header.py │ │ │ │ ├── headerregistry.py │ │ │ │ ├── iterators.py │ │ │ │ ├── message.py │ │ │ │ ├── mime │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── application.py │ │ │ │ │ ├── audio.py │ │ │ │ │ ├── base.py │ │ │ │ │ ├── image.py │ │ │ │ │ ├── message.py │ │ │ │ │ ├── multipart.py │ │ │ │ │ ├── nonmultipart.py │ │ │ │ │ └── text.py │ │ │ │ ├── parser.py │ │ │ │ ├── policy.py │ │ │ │ ├── quoprimime.py │ │ │ │ └── utils.py │ │ │ ├── html │ │ │ │ ├── __init__.py │ │ │ │ ├── entities.py │ │ │ │ └── parser.py │ │ │ ├── http │ │ │ │ ├── __init__.py │ │ │ │ ├── client.py │ │ │ │ ├── cookiejar.py │ │ │ │ ├── cookies.py │ │ │ │ └── server.py │ │ │ ├── misc.py │ │ │ ├── socket.py │ │ │ ├── socketserver.py │ │ │ ├── test │ │ │ │ ├── __init__.py │ │ │ │ ├── badcert.pem │ │ │ │ ├── badkey.pem │ │ │ │ ├── dh512.pem │ │ │ │ ├── https_svn_python_org_root.pem │ │ │ │ ├── keycert.passwd.pem │ │ │ │ ├── keycert.pem │ │ │ │ ├── keycert2.pem │ │ │ │ ├── nokia.pem │ │ │ │ ├── nullbytecert.pem │ │ │ │ ├── nullcert.pem │ │ │ │ ├── pystone.py │ │ │ │ ├── sha256.pem │ │ │ │ ├── ssl_cert.pem │ │ │ │ ├── ssl_key.passwd.pem │ │ │ │ ├── ssl_key.pem │ │ │ │ ├── ssl_servers.py │ │ │ │ └── support.py │ │ │ ├── total_ordering.py │ │ │ ├── urllib │ │ │ │ ├── __init__.py │ │ │ │ ├── error.py │ │ │ │ ├── parse.py │ │ │ │ ├── request.py │ │ │ │ ├── response.py │ │ │ │ └── robotparser.py │ │ │ └── xmlrpc │ │ │ │ ├── __init__.py │ │ │ │ ├── client.py │ │ │ │ └── server.py │ │ ├── builtins │ │ │ ├── __init__.py │ │ │ ├── disabled.py │ │ │ ├── iterators.py │ │ │ ├── misc.py │ │ │ ├── newnext.py │ │ │ ├── newround.py │ │ │ └── newsuper.py │ │ ├── moves │ │ │ ├── __init__.py │ │ │ ├── _dummy_thread.py │ │ │ ├── _markupbase.py │ │ │ ├── _thread.py │ │ │ ├── builtins.py │ │ │ ├── collections.py │ │ │ ├── configparser.py │ │ │ ├── copyreg.py │ │ │ ├── dbm │ │ │ │ ├── __init__.py │ │ │ │ ├── dumb.py │ │ │ │ ├── gnu.py │ │ │ │ └── ndbm.py │ │ │ ├── html │ │ │ │ ├── __init__.py │ │ │ │ ├── entities.py │ │ │ │ └── parser.py │ │ │ ├── http │ │ │ │ ├── __init__.py │ │ │ │ ├── client.py │ │ │ │ ├── cookiejar.py │ │ │ │ ├── cookies.py │ │ │ │ └── server.py │ │ │ ├── itertools.py │ │ │ ├── pickle.py │ │ │ ├── queue.py │ │ │ ├── reprlib.py │ │ │ ├── socketserver.py │ │ │ ├── subprocess.py │ │ │ ├── sys.py │ │ │ ├── test │ │ │ │ ├── __init__.py │ │ │ │ └── support.py │ │ │ ├── tkinter │ │ │ │ ├── __init__.py │ │ │ │ ├── colorchooser.py │ │ │ │ ├── commondialog.py │ │ │ │ ├── constants.py │ │ │ │ ├── dialog.py │ │ │ │ ├── dnd.py │ │ │ │ ├── filedialog.py │ │ │ │ ├── font.py │ │ │ │ ├── messagebox.py │ │ │ │ ├── scrolledtext.py │ │ │ │ ├── simpledialog.py │ │ │ │ ├── tix.py │ │ │ │ └── ttk.py │ │ │ ├── urllib │ │ │ │ ├── __init__.py │ │ │ │ ├── error.py │ │ │ │ ├── parse.py │ │ │ │ ├── request.py │ │ │ │ ├── response.py │ │ │ │ └── robotparser.py │ │ │ ├── winreg.py │ │ │ └── xmlrpc │ │ │ │ ├── __init__.py │ │ │ │ ├── client.py │ │ │ │ └── server.py │ │ ├── standard_library │ │ │ └── __init__.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ └── base.py │ │ ├── types │ │ │ ├── __init__.py │ │ │ ├── newbytes.py │ │ │ ├── newdict.py │ │ │ ├── newint.py │ │ │ ├── newlist.py │ │ │ ├── newmemoryview.py │ │ │ ├── newobject.py │ │ │ ├── newopen.py │ │ │ ├── newrange.py │ │ │ └── newstr.py │ │ └── utils │ │ │ ├── __init__.py │ │ │ └── surrogateescape.py │ ├── libfuturize │ │ ├── __init__.py │ │ ├── fixer_util.py │ │ ├── fixes │ │ │ ├── __init__.py │ │ │ ├── fix_UserDict.py │ │ │ ├── fix_absolute_import.py │ │ │ ├── fix_add__future__imports_except_unicode_literals.py │ │ │ ├── fix_basestring.py │ │ │ ├── fix_bytes.py │ │ │ ├── fix_cmp.py │ │ │ ├── fix_division.py │ │ │ ├── fix_division_safe.py │ │ │ ├── fix_execfile.py │ │ │ ├── fix_future_builtins.py │ │ │ ├── fix_future_standard_library.py │ │ │ ├── fix_future_standard_library_urllib.py │ │ │ ├── fix_metaclass.py │ │ │ ├── fix_next_call.py │ │ │ ├── fix_object.py │ │ │ ├── fix_oldstr_wrap.py │ │ │ ├── fix_order___future__imports.py │ │ │ ├── fix_print.py │ │ │ ├── fix_print_with_import.py │ │ │ ├── fix_raise.py │ │ │ ├── fix_remove_old__future__imports.py │ │ │ ├── fix_unicode_keep_u.py │ │ │ ├── fix_unicode_literals_import.py │ │ │ └── fix_xrange_with_import.py │ │ └── main.py │ ├── libpasteurize │ │ ├── __init__.py │ │ ├── fixes │ │ │ ├── __init__.py │ │ │ ├── feature_base.py │ │ │ ├── fix_add_all__future__imports.py │ │ │ ├── fix_add_all_future_builtins.py │ │ │ ├── fix_add_future_standard_library_import.py │ │ │ ├── fix_annotations.py │ │ │ ├── fix_division.py │ │ │ ├── fix_features.py │ │ │ ├── fix_fullargspec.py │ │ │ ├── fix_future_builtins.py │ │ │ ├── fix_getcwd.py │ │ │ ├── fix_imports.py │ │ │ ├── fix_imports2.py │ │ │ ├── fix_kwargs.py │ │ │ ├── fix_memoryview.py │ │ │ ├── fix_metaclass.py │ │ │ ├── fix_newstyle.py │ │ │ ├── fix_next.py │ │ │ ├── fix_printfunction.py │ │ │ ├── fix_raise.py │ │ │ ├── fix_raise_.py │ │ │ ├── fix_throw.py │ │ │ └── fix_unpacking.py │ │ └── main.py │ ├── mccabe-0.6.1-py3.6.egg-info │ │ ├── PKG-INFO │ │ ├── SOURCES.txt │ │ ├── dependency_links.txt │ │ ├── entry_points.txt │ │ ├── not-zip-safe │ │ └── top_level.txt │ ├── mccabe.py │ ├── pycodestyle-2.3.1-py3.6.egg-info │ │ ├── PKG-INFO │ │ ├── SOURCES.txt │ │ ├── dependency_links.txt │ │ ├── entry_points.txt │ │ ├── namespace_packages.txt │ │ ├── not-zip-safe │ │ └── top_level.txt │ ├── pycodestyle.py │ ├── pyflakes-1.6.0.dist-info │ │ ├── DESCRIPTION.rst │ │ ├── INSTALLER │ │ ├── METADATA │ │ ├── RECORD │ │ ├── WHEEL │ │ ├── entry_points.txt │ │ ├── metadata.json │ │ └── top_level.txt │ ├── pyflakes │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── api.py │ │ ├── checker.py │ │ ├── messages.py │ │ ├── reporter.py │ │ ├── scripts │ │ │ ├── __init__.py │ │ │ └── pyflakes.py │ │ └── test │ │ │ ├── __init__.py │ │ │ ├── harness.py │ │ │ ├── test_api.py │ │ │ ├── test_dict.py │ │ │ ├── test_doctests.py │ │ │ ├── test_imports.py │ │ │ ├── test_other.py │ │ │ ├── test_return_with_arguments_inside_generator.py │ │ │ └── test_undefined_names.py │ ├── rope-0.10.7.dist-info │ │ ├── DESCRIPTION.rst │ │ ├── INSTALLER │ │ ├── METADATA │ │ ├── RECORD │ │ ├── WHEEL │ │ ├── metadata.json │ │ └── top_level.txt │ ├── rope │ │ ├── __init__.py │ │ ├── base │ │ │ ├── __init__.py │ │ │ ├── arguments.py │ │ │ ├── ast.py │ │ │ ├── astutils.py │ │ │ ├── builtins.py │ │ │ ├── change.py │ │ │ ├── codeanalyze.py │ │ │ ├── default_config.py │ │ │ ├── evaluate.py │ │ │ ├── exceptions.py │ │ │ ├── fscommands.py │ │ │ ├── history.py │ │ │ ├── libutils.py │ │ │ ├── oi │ │ │ │ ├── __init__.py │ │ │ │ ├── doa.py │ │ │ │ ├── memorydb.py │ │ │ │ ├── objectdb.py │ │ │ │ ├── objectinfo.py │ │ │ │ ├── runmod.py │ │ │ │ ├── soa.py │ │ │ │ ├── soi.py │ │ │ │ ├── transform.py │ │ │ │ └── type_hinting │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── evaluate.py │ │ │ │ │ ├── factory.py │ │ │ │ │ ├── interfaces.py │ │ │ │ │ ├── providers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── composite.py │ │ │ │ │ ├── docstrings.py │ │ │ │ │ ├── inheritance.py │ │ │ │ │ ├── interfaces.py │ │ │ │ │ ├── numpydocstrings.py │ │ │ │ │ └── pep0484_type_comments.py │ │ │ │ │ ├── resolvers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── composite.py │ │ │ │ │ ├── interfaces.py │ │ │ │ │ └── types.py │ │ │ │ │ └── utils.py │ │ │ ├── prefs.py │ │ │ ├── project.py │ │ │ ├── pycore.py │ │ │ ├── pynames.py │ │ │ ├── pynamesdef.py │ │ │ ├── pyobjects.py │ │ │ ├── pyobjectsdef.py │ │ │ ├── pyscopes.py │ │ │ ├── resourceobserver.py │ │ │ ├── resources.py │ │ │ ├── simplify.py │ │ │ ├── stdmods.py │ │ │ ├── taskhandle.py │ │ │ ├── utils.py │ │ │ ├── utils │ │ │ │ ├── __init__.py │ │ │ │ ├── datastructures.py │ │ │ │ └── pycompat.py │ │ │ └── worder.py │ │ ├── contrib │ │ │ ├── __init__.py │ │ │ ├── autoimport.py │ │ │ ├── changestack.py │ │ │ ├── codeassist.py │ │ │ ├── finderrors.py │ │ │ ├── findit.py │ │ │ ├── fixmodnames.py │ │ │ ├── fixsyntax.py │ │ │ └── generate.py │ │ └── refactor │ │ │ ├── __init__.py │ │ │ ├── change_signature.py │ │ │ ├── encapsulate_field.py │ │ │ ├── extract.py │ │ │ ├── functionutils.py │ │ │ ├── importutils │ │ │ ├── __init__.py │ │ │ ├── actions.py │ │ │ ├── importinfo.py │ │ │ └── module_imports.py │ │ │ ├── inline.py │ │ │ ├── introduce_factory.py │ │ │ ├── introduce_parameter.py │ │ │ ├── localtofield.py │ │ │ ├── method_object.py │ │ │ ├── move.py │ │ │ ├── multiproject.py │ │ │ ├── occurrences.py │ │ │ ├── patchedast.py │ │ │ ├── rename.py │ │ │ ├── restructure.py │ │ │ ├── similarfinder.py │ │ │ ├── sourceutils.py │ │ │ ├── suites.py │ │ │ ├── topackage.py │ │ │ ├── usefunction.py │ │ │ └── wildcards.py │ └── setuptools.py ├── log.py ├── script │ ├── __init__.py │ ├── action_quickly.py │ ├── analyze.py │ ├── clear_annotations.py │ ├── close_all_tabs_except_current_one.py │ ├── drag_and_drop.py │ ├── find_usages.py │ ├── forum-copy-code.py │ ├── jump_to_definition.py │ ├── jump_to_line.py │ ├── new_file.py │ ├── open_quickly.py │ ├── outline_quickly.py │ ├── refactoring │ │ ├── __init__.py │ │ ├── expand_star_imports.py │ │ ├── futurize.py │ │ ├── organize_imports.py │ │ └── rename.py │ ├── run_quickly.py │ ├── run_unit_tests.py │ ├── search_dash.py │ ├── selfupdate.py │ ├── show_documentation.py │ └── toggle_comments.py ├── system.py ├── uikit │ ├── __init__.py │ ├── autolayout.py │ ├── keyboard.py │ ├── overlay.py │ ├── picker.py │ └── table.py ├── update.py └── util │ ├── __init__.py │ ├── path.py │ └── runtime.py ├── docs ├── .gitignore ├── Makefile ├── autobuild.sh ├── build.sh ├── requirements.txt └── source │ ├── _static │ ├── images │ │ ├── analyzer.jpeg │ │ ├── docstrings.jpeg │ │ ├── drag_and_drop.jpeg │ │ ├── find_usages.jpeg │ │ ├── open_quickly.jpeg │ │ ├── refactoring_preview.jpeg │ │ ├── refactoring_rename.jpeg │ │ ├── run_quickly.jpeg │ │ ├── shortcuts.jpeg │ │ └── unit_tests.jpeg │ └── styles.css │ ├── _templates │ └── layout.html │ ├── about.md │ ├── acknowledgments │ ├── docutils.md │ ├── flake8.md │ ├── future.md │ ├── index.md │ ├── mccabe.md │ ├── pycodestyle.md │ ├── pyflakes.md │ └── rope.md │ ├── api │ ├── blackmamba.framework.security.md │ ├── blackmamba.log.md │ ├── blackmamba.md │ ├── blackmamba.system.md │ ├── blackmamba.uikit.keyboard.md │ └── index.md │ ├── conf.py │ ├── contribution.md │ ├── faq.md │ ├── gallery.md │ ├── index.md │ └── user │ ├── configuration.md │ ├── index.md │ ├── install.md │ ├── requirements.md │ ├── scripts.md │ └── shortcuts.md ├── env.py ├── install.py ├── pythonista_startup.py ├── readthedocs.yml ├── requirements.txt └── tests ├── __init__.py ├── framework ├── __init__.py └── test_security.py └── script ├── __init__.py └── test_toggle_comments.py /.gitignore: -------------------------------------------------------------------------------- 1 | .cache 2 | __pycache__ 3 | dist 4 | blackmamba.egg-info 5 | Readme.md 6 | MANIFEST 7 | .idea 8 | .blackmamba 9 | .DS_Store 10 | **/*.icloud 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | cache: pip 3 | python: 4 | # Check https://github.com/zrzka/blackmamba/issues/7 5 | # - 2.7.13 6 | - 3.6 7 | install: 8 | - pip install -r requirements.txt 9 | before_script: 10 | - flake8 . --count --max-complexity=10 --max-line-length=124 --statistics --exclude lib 11 | script: 12 | - PYTHONPATH=. pytest tests 13 | notifications: 14 | on_success: change 15 | on_failure: always 16 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Robert Vojta (@robertvojta) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ########### 2 | Black Mamba 3 | ########### 4 | 5 | 6 | Build status 7 | ============ 8 | 9 | .. image:: https://travis-ci.org/zrzka/blackmamba.svg?branch=master 10 | :alt: Travis CI Build Status 11 | 12 | .. image:: https://readthedocs.org/projects/blackmamba/badge/?version=latest 13 | :target: http://blackmamba.readthedocs.io/en/latest/?badge=latest 14 | :alt: Documentation Status 15 | 16 | 17 | Documentation 18 | ============= 19 | 20 | Everything you need to know is available in the `Black Mamba Documentation `_. 21 | -------------------------------------------------------------------------------- /blackmamba/ide/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/ide/__init__.py -------------------------------------------------------------------------------- /blackmamba/ide/action.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | import blackmamba.ide.script as script 4 | 5 | 6 | class ActionInfo(object): 7 | def __init__(self, action_info): 8 | self.script_name = str(action_info['scriptName']) 9 | self.icon_name = str(action_info['iconName']) 10 | 11 | if action_info['title']: 12 | self.title = str(action_info['title']) 13 | else: 14 | self.title = None 15 | 16 | if action_info['iconColor']: 17 | self.icon_color = '#{}'.format(action_info['iconColor']) 18 | else: 19 | self.icon_color = '#FFFFFF' 20 | 21 | def run(self, delay=None): 22 | script.run_script(self.script_name, delay=delay) 23 | 24 | 25 | def get_actions(): 26 | from objc_util import ObjCClass 27 | defaults = ObjCClass('NSUserDefaults').standardUserDefaults() 28 | action_infos = defaults.objectForKey_('EditorActionInfos') or [] 29 | return [ActionInfo(ai) for ai in action_infos] 30 | 31 | 32 | def get_action(title): 33 | for action in get_actions(): 34 | if action.title == title: 35 | return action 36 | return None 37 | 38 | 39 | def run_action(title, delay=None): 40 | action = get_action(title) 41 | 42 | if not action: 43 | return 44 | 45 | action.run(delay) 46 | -------------------------------------------------------------------------------- /blackmamba/ide/annotation.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | from enum import Enum 4 | 5 | 6 | class Style(str, Enum): 7 | error = 'error' 8 | warning = 'warning' 9 | 10 | 11 | class Annotation(object): 12 | def __init__(self, line, text, style, filename=None): 13 | self.line = line 14 | self.text = text 15 | self.style = style 16 | self.filename = filename 17 | -------------------------------------------------------------------------------- /blackmamba/ide/bookmark.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | import plistlib 4 | import os 5 | from objc_util import ns, NSURL 6 | import blackmamba.system as system 7 | 8 | _BOOKMARKS_FILE = os.path.expanduser('~/Bookmarks.plist') 9 | 10 | 11 | @system.iOS('11.0') 12 | def get_bookmark_paths(): 13 | if not os.path.isfile(_BOOKMARKS_FILE): 14 | return None 15 | 16 | with open(_BOOKMARKS_FILE, 'rb') as in_file: 17 | content = plistlib.readPlist(in_file) 18 | 19 | if not content: 20 | return None 21 | 22 | paths = [] 23 | for data in content: 24 | url = NSURL.URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( 25 | ns(data.data), 1 << 8, None, None, None 26 | ) 27 | if url and url.isFileURL(): 28 | paths.append(str(url.path())) 29 | 30 | return paths 31 | -------------------------------------------------------------------------------- /blackmamba/ide/script.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | import os 4 | import urllib 5 | import webbrowser 6 | import ui 7 | from blackmamba.log import error 8 | 9 | 10 | def script_exists(script_name, full_path=False): 11 | if not full_path: 12 | script_name = os.path.join(os.path.expanduser('~/Documents'), script_name) 13 | return os.path.exists(script_name) 14 | 15 | 16 | def run_script(script_name, full_path=False, delay=None): 17 | if not full_path and script_name.startswith('/'): 18 | script_name = script_name[1:] 19 | 20 | if not script_exists(script_name, full_path): 21 | error('run_script: script does not exist {}'.format(script_name)) 22 | return 23 | 24 | if full_path: 25 | docs_root = os.path.expanduser('~/Documents/') 26 | script_name = script_name[len(docs_root):] 27 | 28 | encoded_name = urllib.parse.quote_plus(script_name, safe='', encoding=None, errors=None) 29 | url = 'pythonista3://{}?action=run'.format(encoded_name) 30 | 31 | if delay: 32 | def make_open_url(url): 33 | def open(): 34 | webbrowser.open(url) 35 | return open 36 | 37 | ui.delay(make_open_url(url), delay) 38 | else: 39 | webbrowser.open(url) 40 | -------------------------------------------------------------------------------- /blackmamba/ide/source.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | import editor 4 | from blackmamba.config import get_config_value 5 | 6 | 7 | def get_line_count(): 8 | text = editor.get_text() 9 | 10 | if text is None: 11 | return None 12 | 13 | return len(text.splitlines()) 14 | 15 | 16 | def get_line_number(): 17 | text = editor.get_text() 18 | 19 | if text is None: 20 | return None 21 | 22 | return text.count('\n', 0, editor.get_selection()[0]) + 1 23 | 24 | 25 | def get_column_index(): 26 | text = editor.get_text() 27 | 28 | if text is None: 29 | return None 30 | 31 | col = 0 32 | index = editor.get_selection()[0] 33 | while index > 0: 34 | if text[index - 1] == '\n': 35 | break 36 | index -= 1 37 | col += 1 38 | 39 | return col 40 | 41 | 42 | def scroll_to_line(line_number, relative=False): 43 | text = editor.get_text() 44 | if not text: 45 | return 46 | 47 | if relative: 48 | current_line = get_line_number() 49 | line_count = get_line_count() 50 | 51 | if current_line is None or line_count is None: 52 | return 53 | 54 | line_number = max(min(current_line + line_number, line_count), 1) 55 | 56 | # https://github.com/omz/Pythonista-Issues/issues/365 57 | start = 0 58 | for index, line in enumerate(text.splitlines(True)): 59 | if index == line_number - 1: 60 | editor.set_selection(start) 61 | return 62 | start += len(line) 63 | editor.set_selection(start) 64 | 65 | 66 | def page_up(): 67 | scroll_to_line(-get_config_value('general.page_line_count', 40), True) 68 | 69 | 70 | def page_down(): 71 | scroll_to_line(get_config_value('general.page_line_count', 40), True) 72 | -------------------------------------------------------------------------------- /blackmamba/ide/theme.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | from objc_util import ObjCClass 4 | import editor 5 | 6 | _DEFAULTS = ObjCClass('NSUserDefaults').standardUserDefaults() 7 | 8 | _THEME = { 9 | 'active_bar_background_color': ('bar_background', '#ffffff'), 10 | 'inactive_bar_background_color': ('tab_background', '#f0f0f0'), 11 | 'bar_title_color': ('tab_title', '#000000'), 12 | 'text_color': ('default_text', '#000000'), 13 | 'tint_color': ('tint', '#5794b0'), 14 | 'separator_color': ('separator_line', '#b3b3b3'), 15 | 'background_color': ('background', '#ffffff') 16 | } 17 | 18 | 19 | def get_theme(): 20 | return editor.get_theme_dict() 21 | 22 | 23 | def get_theme_value(key): 24 | theme = get_theme() 25 | if key in _THEME: 26 | return theme.get(_THEME[key][0], _THEME[key][1]) 27 | return theme.get(key, None) 28 | 29 | 30 | def get_editor_font_name(): 31 | return str(_DEFAULTS.objectForKey_('EditorFontName')) 32 | 33 | 34 | def get_editor_font_size(): 35 | return int(_DEFAULTS.integerForKey_('EditorFontSize')) 36 | 37 | 38 | def get_editor_font(): 39 | return get_editor_font_name(), get_editor_font_size() 40 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils-0.14.dist-info/DESCRIPTION.rst: -------------------------------------------------------------------------------- 1 | Docutils is a modular system for processing documentation 2 | into useful formats, such as HTML, XML, and LaTeX. For 3 | input Docutils supports reStructuredText, an easy-to-read, 4 | what-you-see-is-what-you-get plaintext markup syntax. 5 | 6 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils-0.14.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils-0.14.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.24.0) 3 | Root-Is-Purelib: true 4 | Tag: py3-none-any 5 | 6 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils-0.14.dist-info/metadata.json: -------------------------------------------------------------------------------- 1 | {"license": "public domain, Python, 2-Clause BSD, GPL 3 (see COPYING.txt)", "classifiers": ["Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: End Users/Desktop", "Intended Audience :: Other Audience", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: Public Domain", "License :: OSI Approved :: Python Software Foundation License", "License :: OSI Approved :: BSD License", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.4", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Documentation", "Topic :: Software Development :: Documentation", "Topic :: Text Processing", "Natural Language :: English", "Natural Language :: Afrikaans", "Natural Language :: Catalan", "Natural Language :: Chinese (Simplified)", "Natural Language :: Chinese (Traditional)", "Natural Language :: Czech", "Natural Language :: Dutch", "Natural Language :: Esperanto", "Natural Language :: Finnish", "Natural Language :: French", "Natural Language :: Galician", "Natural Language :: German", "Natural Language :: Italian", "Natural Language :: Japanese", "Natural Language :: Polish", "Natural Language :: Portuguese (Brazilian)", "Natural Language :: Russian", "Natural Language :: Slovak", "Natural Language :: Spanish", "Natural Language :: Swedish"], "metadata_version": "2.0", "version": "0.14", "name": "docutils", "extensions": {"python.details": {"contacts": [{"email": "docutils-develop@lists.sourceforge.net", "role": "author", "name": "docutils-develop list"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "http://docutils.sourceforge.net/"}}}, "platform": "OS-independent", "generator": "bdist_wheel (0.24.0)", "summary": "Docutils -- Python Documentation Utilities"} -------------------------------------------------------------------------------- /blackmamba/lib/docutils-0.14.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | docutils 2 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/_compat.py: -------------------------------------------------------------------------------- 1 | # $Id: _compat.py 7486 2012-07-11 12:25:14Z milde $ 2 | # Author: Georg Brandl 3 | # Copyright: This module has been placed in the public domain. 4 | 5 | """ 6 | Python 2/3 compatibility definitions. 7 | 8 | This module currently provides the following helper symbols: 9 | 10 | * bytes (name of byte string type; str in 2.x, bytes in 3.x) 11 | * b (function converting a string literal to an ASCII byte string; 12 | can be also used to convert a Unicode string into a byte string) 13 | * u_prefix (unicode repr prefix: 'u' in 2.x, '' in 3.x) 14 | (Required in docutils/test/test_publisher.py) 15 | * BytesIO (a StringIO class that works with bytestrings) 16 | """ 17 | 18 | import sys 19 | 20 | if sys.version_info < (3,0): 21 | b = bytes = str 22 | u_prefix = 'u' 23 | from io import StringIO as BytesIO 24 | else: 25 | import builtins 26 | bytes = builtins.bytes 27 | u_prefix = '' 28 | def b(s): 29 | if isinstance(s, str): 30 | return s.encode('latin1') 31 | elif isinstance(s, bytes): 32 | return s 33 | else: 34 | raise TypeError("Invalid argument %r for b()" % (s,)) 35 | # using this hack since 2to3 "fixes" the relative import 36 | # when using ``from io import BytesIO`` 37 | BytesIO = __import__('io').BytesIO 38 | 39 | if sys.version_info < (2,5): 40 | import builtins 41 | 42 | def __import__(name, globals={}, locals={}, fromlist=[], level=-1): 43 | """Compatibility definition for Python 2.4. 44 | 45 | Silently ignore the `level` argument missing in Python < 2.5. 46 | """ 47 | # we need the level arg because the default changed in Python 3.3 48 | return builtins.__import__(name, globals, locals, fromlist) 49 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/languages/__init__.py: -------------------------------------------------------------------------------- 1 | # $Id: __init__.py 7648 2013-04-18 07:36:22Z milde $ 2 | # Author: David Goodger 3 | # Copyright: This module has been placed in the public domain. 4 | 5 | # Internationalization details are documented in 6 | # . 7 | 8 | """ 9 | This package contains modules for language-dependent features of Docutils. 10 | """ 11 | 12 | __docformat__ = 'reStructuredText' 13 | 14 | import sys 15 | 16 | from docutils.utils import normalize_language_tag 17 | if sys.version_info < (2,5): 18 | from docutils._compat import __import__ 19 | 20 | _languages = {} 21 | 22 | def get_language(language_code, reporter=None): 23 | """Return module with language localizations. 24 | 25 | `language_code` is a "BCP 47" language tag. 26 | If there is no matching module, warn and fall back to English. 27 | """ 28 | # TODO: use a dummy module returning emtpy strings?, configurable? 29 | for tag in normalize_language_tag(language_code): 30 | tag = tag.replace('-','_') # '-' not valid in module names 31 | if tag in _languages: 32 | return _languages[tag] 33 | try: 34 | module = __import__(tag, globals(), locals(), level=1) 35 | except ImportError: 36 | try: 37 | module = __import__(tag, globals(), locals(), level=0) 38 | except ImportError: 39 | continue 40 | _languages[tag] = module 41 | return module 42 | if reporter is not None: 43 | reporter.warning( 44 | 'language "%s" not supported: ' % language_code + 45 | 'Docutils-generated text will be in English.') 46 | module = __import__('en', globals(), locals(), level=1) 47 | _languages[tag] = module # warn only one time! 48 | return module 49 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/parsers/__init__.py: -------------------------------------------------------------------------------- 1 | # $Id: __init__.py 7646 2013-04-17 14:17:37Z milde $ 2 | # Author: David Goodger 3 | # Copyright: This module has been placed in the public domain. 4 | 5 | """ 6 | This package contains Docutils parser modules. 7 | """ 8 | 9 | __docformat__ = 'reStructuredText' 10 | 11 | import sys 12 | from docutils import Component 13 | if sys.version_info < (2,5): 14 | from docutils._compat import __import__ 15 | 16 | 17 | class Parser(Component): 18 | 19 | component_type = 'parser' 20 | config_section = 'parsers' 21 | 22 | def parse(self, inputstring, document): 23 | """Override to parse `inputstring` into document tree `document`.""" 24 | raise NotImplementedError('subclass must override this method') 25 | 26 | def setup_parse(self, inputstring, document): 27 | """Initial parse setup. Call at start of `self.parse()`.""" 28 | self.inputstring = inputstring 29 | self.document = document 30 | document.reporter.attach_observer(document.note_parse_message) 31 | 32 | def finish_parse(self): 33 | """Finalize parse details. Call at end of `self.parse()`.""" 34 | self.document.reporter.detach_observer( 35 | self.document.note_parse_message) 36 | 37 | 38 | _parser_aliases = { 39 | 'restructuredtext': 'rst', 40 | 'rest': 'rst', 41 | 'restx': 'rst', 42 | 'rtxt': 'rst',} 43 | 44 | def get_parser_class(parser_name): 45 | """Return the Parser class from the `parser_name` module.""" 46 | parser_name = parser_name.lower() 47 | if parser_name in _parser_aliases: 48 | parser_name = _parser_aliases[parser_name] 49 | try: 50 | module = __import__(parser_name, globals(), locals(), level=1) 51 | except ImportError: 52 | module = __import__(parser_name, globals(), locals(), level=0) 53 | return module.Parser 54 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/parsers/null.py: -------------------------------------------------------------------------------- 1 | # $Id: null.py 4564 2006-05-21 20:44:42Z wiemann $ 2 | # Author: Martin Blais 3 | # Copyright: This module has been placed in the public domain. 4 | 5 | """A do-nothing parser.""" 6 | 7 | from docutils import parsers 8 | 9 | 10 | class Parser(parsers.Parser): 11 | 12 | """A do-nothing parser.""" 13 | 14 | supported = ('null',) 15 | 16 | config_section = 'null parser' 17 | config_section_dependencies = ('parsers',) 18 | 19 | def parse(self, inputstring, document): 20 | pass 21 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/parsers/rst/directives/references.py: -------------------------------------------------------------------------------- 1 | # $Id: references.py 7062 2011-06-30 22:14:29Z milde $ 2 | # Authors: David Goodger ; Dmitry Jemerov 3 | # Copyright: This module has been placed in the public domain. 4 | 5 | """ 6 | Directives for references and targets. 7 | """ 8 | 9 | __docformat__ = 'reStructuredText' 10 | 11 | from docutils import nodes 12 | from docutils.transforms import references 13 | from docutils.parsers.rst import Directive 14 | from docutils.parsers.rst import directives 15 | 16 | 17 | class TargetNotes(Directive): 18 | 19 | """Target footnote generation.""" 20 | 21 | option_spec = {'class': directives.class_option, 22 | 'name': directives.unchanged} 23 | 24 | def run(self): 25 | pending = nodes.pending(references.TargetNotes) 26 | self.add_name(pending) 27 | pending.details.update(self.options) 28 | self.state_machine.document.note_pending(pending) 29 | return [pending] 30 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/parsers/rst/include/README.txt: -------------------------------------------------------------------------------- 1 | ============================================ 2 | ``docutils/parsers/rst/include`` Directory 3 | ============================================ 4 | 5 | This directory contains standard data files intended for inclusion in 6 | reStructuredText documents. To access these files, use the "include" 7 | directive with the special syntax for standard "include" data files, 8 | angle brackets around the file name:: 9 | 10 | .. include:: 11 | 12 | See the documentation for the `"include" directive`__ and 13 | `reStructuredText Standard Substitution Definition Sets`__ for 14 | details. 15 | 16 | __ http://docutils.sf.net/docs/ref/rst/directives.html#include 17 | __ http://docutils.sf.net/docs/ref/rst/substitutions.html 18 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/parsers/rst/include/isoamsc.txt: -------------------------------------------------------------------------------- 1 | .. This data file has been placed in the public domain. 2 | .. Derived from the Unicode character mappings available from 3 | . 4 | Processed by unicode2rstsubs.py, part of Docutils: 5 | . 6 | 7 | .. |dlcorn| unicode:: U+0231E .. BOTTOM LEFT CORNER 8 | .. |drcorn| unicode:: U+0231F .. BOTTOM RIGHT CORNER 9 | .. |gtlPar| unicode:: U+02995 .. DOUBLE LEFT ARC GREATER-THAN BRACKET 10 | .. |langd| unicode:: U+02991 .. LEFT ANGLE BRACKET WITH DOT 11 | .. |lbrke| unicode:: U+0298B .. LEFT SQUARE BRACKET WITH UNDERBAR 12 | .. |lbrksld| unicode:: U+0298F .. LEFT SQUARE BRACKET WITH TICK IN BOTTOM CORNER 13 | .. |lbrkslu| unicode:: U+0298D .. LEFT SQUARE BRACKET WITH TICK IN TOP CORNER 14 | .. |lceil| unicode:: U+02308 .. LEFT CEILING 15 | .. |lfloor| unicode:: U+0230A .. LEFT FLOOR 16 | .. |lmoust| unicode:: U+023B0 .. UPPER LEFT OR LOWER RIGHT CURLY BRACKET SECTION 17 | .. |lpargt| unicode:: U+029A0 .. SPHERICAL ANGLE OPENING LEFT 18 | .. |lparlt| unicode:: U+02993 .. LEFT ARC LESS-THAN BRACKET 19 | .. |ltrPar| unicode:: U+02996 .. DOUBLE RIGHT ARC LESS-THAN BRACKET 20 | .. |rangd| unicode:: U+02992 .. RIGHT ANGLE BRACKET WITH DOT 21 | .. |rbrke| unicode:: U+0298C .. RIGHT SQUARE BRACKET WITH UNDERBAR 22 | .. |rbrksld| unicode:: U+0298E .. RIGHT SQUARE BRACKET WITH TICK IN BOTTOM CORNER 23 | .. |rbrkslu| unicode:: U+02990 .. RIGHT SQUARE BRACKET WITH TICK IN TOP CORNER 24 | .. |rceil| unicode:: U+02309 .. RIGHT CEILING 25 | .. |rfloor| unicode:: U+0230B .. RIGHT FLOOR 26 | .. |rmoust| unicode:: U+023B1 .. UPPER RIGHT OR LOWER LEFT CURLY BRACKET SECTION 27 | .. |rpargt| unicode:: U+02994 .. RIGHT ARC GREATER-THAN BRACKET 28 | .. |ulcorn| unicode:: U+0231C .. TOP LEFT CORNER 29 | .. |urcorn| unicode:: U+0231D .. TOP RIGHT CORNER 30 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/parsers/rst/include/isodia.txt: -------------------------------------------------------------------------------- 1 | .. This data file has been placed in the public domain. 2 | .. Derived from the Unicode character mappings available from 3 | . 4 | Processed by unicode2rstsubs.py, part of Docutils: 5 | . 6 | 7 | .. |acute| unicode:: U+000B4 .. ACUTE ACCENT 8 | .. |breve| unicode:: U+002D8 .. BREVE 9 | .. |caron| unicode:: U+002C7 .. CARON 10 | .. |cedil| unicode:: U+000B8 .. CEDILLA 11 | .. |circ| unicode:: U+002C6 .. MODIFIER LETTER CIRCUMFLEX ACCENT 12 | .. |dblac| unicode:: U+002DD .. DOUBLE ACUTE ACCENT 13 | .. |die| unicode:: U+000A8 .. DIAERESIS 14 | .. |dot| unicode:: U+002D9 .. DOT ABOVE 15 | .. |grave| unicode:: U+00060 .. GRAVE ACCENT 16 | .. |macr| unicode:: U+000AF .. MACRON 17 | .. |ogon| unicode:: U+002DB .. OGONEK 18 | .. |ring| unicode:: U+002DA .. RING ABOVE 19 | .. |tilde| unicode:: U+002DC .. SMALL TILDE 20 | .. |uml| unicode:: U+000A8 .. DIAERESIS 21 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/parsers/rst/include/isogrk2.txt: -------------------------------------------------------------------------------- 1 | .. This data file has been placed in the public domain. 2 | .. Derived from the Unicode character mappings available from 3 | . 4 | Processed by unicode2rstsubs.py, part of Docutils: 5 | . 6 | 7 | .. |Aacgr| unicode:: U+00386 .. GREEK CAPITAL LETTER ALPHA WITH TONOS 8 | .. |aacgr| unicode:: U+003AC .. GREEK SMALL LETTER ALPHA WITH TONOS 9 | .. |Eacgr| unicode:: U+00388 .. GREEK CAPITAL LETTER EPSILON WITH TONOS 10 | .. |eacgr| unicode:: U+003AD .. GREEK SMALL LETTER EPSILON WITH TONOS 11 | .. |EEacgr| unicode:: U+00389 .. GREEK CAPITAL LETTER ETA WITH TONOS 12 | .. |eeacgr| unicode:: U+003AE .. GREEK SMALL LETTER ETA WITH TONOS 13 | .. |Iacgr| unicode:: U+0038A .. GREEK CAPITAL LETTER IOTA WITH TONOS 14 | .. |iacgr| unicode:: U+003AF .. GREEK SMALL LETTER IOTA WITH TONOS 15 | .. |idiagr| unicode:: U+00390 .. GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS 16 | .. |Idigr| unicode:: U+003AA .. GREEK CAPITAL LETTER IOTA WITH DIALYTIKA 17 | .. |idigr| unicode:: U+003CA .. GREEK SMALL LETTER IOTA WITH DIALYTIKA 18 | .. |Oacgr| unicode:: U+0038C .. GREEK CAPITAL LETTER OMICRON WITH TONOS 19 | .. |oacgr| unicode:: U+003CC .. GREEK SMALL LETTER OMICRON WITH TONOS 20 | .. |OHacgr| unicode:: U+0038F .. GREEK CAPITAL LETTER OMEGA WITH TONOS 21 | .. |ohacgr| unicode:: U+003CE .. GREEK SMALL LETTER OMEGA WITH TONOS 22 | .. |Uacgr| unicode:: U+0038E .. GREEK CAPITAL LETTER UPSILON WITH TONOS 23 | .. |uacgr| unicode:: U+003CD .. GREEK SMALL LETTER UPSILON WITH TONOS 24 | .. |udiagr| unicode:: U+003B0 .. GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS 25 | .. |Udigr| unicode:: U+003AB .. GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA 26 | .. |udigr| unicode:: U+003CB .. GREEK SMALL LETTER UPSILON WITH DIALYTIKA 27 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/parsers/rst/include/isogrk4.txt: -------------------------------------------------------------------------------- 1 | .. This data file has been placed in the public domain. 2 | .. Derived from the Unicode character mappings available from 3 | . 4 | Processed by unicode2rstsubs.py, part of Docutils: 5 | . 6 | 7 | .. |b.Gammad| unicode:: U+003DC .. GREEK LETTER DIGAMMA 8 | .. |b.gammad| unicode:: U+003DD .. GREEK SMALL LETTER DIGAMMA 9 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/parsers/rst/include/isomfrk.txt: -------------------------------------------------------------------------------- 1 | .. This data file has been placed in the public domain. 2 | .. Derived from the Unicode character mappings available from 3 | . 4 | Processed by unicode2rstsubs.py, part of Docutils: 5 | . 6 | 7 | .. |Cfr| unicode:: U+0212D .. BLACK-LETTER CAPITAL C 8 | .. |Hfr| unicode:: U+0210C .. BLACK-LETTER CAPITAL H 9 | .. |Ifr| unicode:: U+02111 .. BLACK-LETTER CAPITAL I 10 | .. |Rfr| unicode:: U+0211C .. BLACK-LETTER CAPITAL R 11 | .. |Zfr| unicode:: U+02128 .. BLACK-LETTER CAPITAL Z 12 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/parsers/rst/include/isomopf.txt: -------------------------------------------------------------------------------- 1 | .. This data file has been placed in the public domain. 2 | .. Derived from the Unicode character mappings available from 3 | . 4 | Processed by unicode2rstsubs.py, part of Docutils: 5 | . 6 | 7 | .. |Copf| unicode:: U+02102 .. DOUBLE-STRUCK CAPITAL C 8 | .. |Hopf| unicode:: U+0210D .. DOUBLE-STRUCK CAPITAL H 9 | .. |Nopf| unicode:: U+02115 .. DOUBLE-STRUCK CAPITAL N 10 | .. |Popf| unicode:: U+02119 .. DOUBLE-STRUCK CAPITAL P 11 | .. |Qopf| unicode:: U+0211A .. DOUBLE-STRUCK CAPITAL Q 12 | .. |Ropf| unicode:: U+0211D .. DOUBLE-STRUCK CAPITAL R 13 | .. |Zopf| unicode:: U+02124 .. DOUBLE-STRUCK CAPITAL Z 14 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/parsers/rst/include/isomscr.txt: -------------------------------------------------------------------------------- 1 | .. This data file has been placed in the public domain. 2 | .. Derived from the Unicode character mappings available from 3 | . 4 | Processed by unicode2rstsubs.py, part of Docutils: 5 | . 6 | 7 | .. |Bscr| unicode:: U+0212C .. SCRIPT CAPITAL B 8 | .. |Escr| unicode:: U+02130 .. SCRIPT CAPITAL E 9 | .. |escr| unicode:: U+0212F .. SCRIPT SMALL E 10 | .. |Fscr| unicode:: U+02131 .. SCRIPT CAPITAL F 11 | .. |gscr| unicode:: U+0210A .. SCRIPT SMALL G 12 | .. |Hscr| unicode:: U+0210B .. SCRIPT CAPITAL H 13 | .. |Iscr| unicode:: U+02110 .. SCRIPT CAPITAL I 14 | .. |Lscr| unicode:: U+02112 .. SCRIPT CAPITAL L 15 | .. |Mscr| unicode:: U+02133 .. SCRIPT CAPITAL M 16 | .. |oscr| unicode:: U+02134 .. SCRIPT SMALL O 17 | .. |Rscr| unicode:: U+0211B .. SCRIPT CAPITAL R 18 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/parsers/rst/include/s5defs.txt: -------------------------------------------------------------------------------- 1 | .. Definitions of interpreted text roles (classes) for S5/HTML data. 2 | .. This data file has been placed in the public domain. 3 | 4 | .. Colours 5 | ======= 6 | 7 | .. role:: black 8 | .. role:: gray 9 | .. role:: silver 10 | .. role:: white 11 | 12 | .. role:: maroon 13 | .. role:: red 14 | .. role:: magenta 15 | .. role:: fuchsia 16 | .. role:: pink 17 | .. role:: orange 18 | .. role:: yellow 19 | .. role:: lime 20 | .. role:: green 21 | .. role:: olive 22 | .. role:: teal 23 | .. role:: cyan 24 | .. role:: aqua 25 | .. role:: blue 26 | .. role:: navy 27 | .. role:: purple 28 | 29 | 30 | .. Text Sizes 31 | ========== 32 | 33 | .. role:: huge 34 | .. role:: big 35 | .. role:: small 36 | .. role:: tiny 37 | 38 | 39 | .. Display in Slides (Presentation Mode) Only 40 | ========================================== 41 | 42 | .. role:: slide 43 | :class: slide-display 44 | 45 | 46 | .. Display in Outline Mode Only 47 | ============================ 48 | 49 | .. role:: outline 50 | 51 | 52 | .. Display in Print Only 53 | ===================== 54 | 55 | .. role:: print 56 | 57 | 58 | .. Display in Handout Mode Only 59 | ============================ 60 | 61 | .. role:: handout 62 | 63 | 64 | .. Incremental Display 65 | =================== 66 | 67 | .. role:: incremental 68 | .. default-role:: incremental 69 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/parsers/rst/languages/__init__.py: -------------------------------------------------------------------------------- 1 | # $Id: __init__.py 7648 2013-04-18 07:36:22Z milde $ 2 | # Author: David Goodger 3 | # Copyright: This module has been placed in the public domain. 4 | 5 | # Internationalization details are documented in 6 | # . 7 | 8 | """ 9 | This package contains modules for language-dependent features of 10 | reStructuredText. 11 | """ 12 | 13 | __docformat__ = 'reStructuredText' 14 | 15 | import sys 16 | 17 | from docutils.utils import normalize_language_tag 18 | if sys.version_info < (2,5): 19 | from docutils._compat import __import__ 20 | 21 | _languages = {} 22 | 23 | def get_language(language_code): 24 | for tag in normalize_language_tag(language_code): 25 | tag = tag.replace('-','_') # '-' not valid in module names 26 | if tag in _languages: 27 | return _languages[tag] 28 | try: 29 | module = __import__(tag, globals(), locals(), level=1) 30 | except ImportError: 31 | try: 32 | module = __import__(tag, globals(), locals(), level=0) 33 | except ImportError: 34 | continue 35 | _languages[tag] = module 36 | return module 37 | return None 38 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/readers/doctree.py: -------------------------------------------------------------------------------- 1 | # $Id: doctree.py 4564 2006-05-21 20:44:42Z wiemann $ 2 | # Author: Martin Blais 3 | # Copyright: This module has been placed in the public domain. 4 | 5 | """Reader for existing document trees.""" 6 | 7 | from docutils import readers, utils, transforms 8 | 9 | 10 | class Reader(readers.ReReader): 11 | 12 | """ 13 | Adapt the Reader API for an existing document tree. 14 | 15 | The existing document tree must be passed as the ``source`` parameter to 16 | the `docutils.core.Publisher` initializer, wrapped in a 17 | `docutils.io.DocTreeInput` object:: 18 | 19 | pub = docutils.core.Publisher( 20 | ..., source=docutils.io.DocTreeInput(document), ...) 21 | 22 | The original document settings are overridden; if you want to use the 23 | settings of the original document, pass ``settings=document.settings`` to 24 | the Publisher call above. 25 | """ 26 | 27 | supported = ('doctree',) 28 | 29 | config_section = 'doctree reader' 30 | config_section_dependencies = ('readers',) 31 | 32 | def parse(self): 33 | """ 34 | No parsing to do; refurbish the document tree instead. 35 | Overrides the inherited method. 36 | """ 37 | self.document = self.input 38 | # Create fresh Transformer object, to be populated from Writer 39 | # component. 40 | self.document.transformer = transforms.Transformer(self.document) 41 | # Replace existing settings object with new one. 42 | self.document.settings = self.settings 43 | # Create fresh Reporter object because it is dependent on 44 | # (new) settings. 45 | self.document.reporter = utils.new_reporter( 46 | self.document.get('source', ''), self.document.settings) 47 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/readers/pep.py: -------------------------------------------------------------------------------- 1 | # $Id: pep.py 7320 2012-01-19 22:33:02Z milde $ 2 | # Author: David Goodger 3 | # Copyright: This module has been placed in the public domain. 4 | 5 | """ 6 | Python Enhancement Proposal (PEP) Reader. 7 | """ 8 | 9 | __docformat__ = 'reStructuredText' 10 | 11 | 12 | from docutils.readers import standalone 13 | from docutils.transforms import peps, references, misc, frontmatter 14 | from docutils.parsers import rst 15 | 16 | 17 | class Reader(standalone.Reader): 18 | 19 | supported = ('pep',) 20 | """Contexts this reader supports.""" 21 | 22 | settings_spec = ( 23 | 'PEP Reader Option Defaults', 24 | 'The --pep-references and --rfc-references options (for the ' 25 | 'reStructuredText parser) are on by default.', 26 | ()) 27 | 28 | config_section = 'pep reader' 29 | config_section_dependencies = ('readers', 'standalone reader') 30 | 31 | def get_transforms(self): 32 | transforms = standalone.Reader.get_transforms(self) 33 | # We have PEP-specific frontmatter handling. 34 | transforms.remove(frontmatter.DocTitle) 35 | transforms.remove(frontmatter.SectionSubTitle) 36 | transforms.remove(frontmatter.DocInfo) 37 | transforms.extend([peps.Headers, peps.Contents, peps.TargetNotes]) 38 | return transforms 39 | 40 | settings_default_overrides = {'pep_references': 1, 'rfc_references': 1} 41 | 42 | inliner_class = rst.states.Inliner 43 | 44 | def __init__(self, parser=None, parser_name=None): 45 | """`parser` should be ``None``.""" 46 | if parser is None: 47 | parser = rst.Parser(rfc2822=True, inliner=self.inliner_class()) 48 | standalone.Reader.__init__(self, parser, '') 49 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/html4css1/template.txt: -------------------------------------------------------------------------------- 1 | %(head_prefix)s 2 | %(head)s 3 | %(stylesheet)s 4 | %(body_prefix)s 5 | %(body_pre_docinfo)s 6 | %(docinfo)s 7 | %(body)s 8 | %(body_suffix)s 9 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/html5_polyglot/template.txt: -------------------------------------------------------------------------------- 1 | %(head_prefix)s 2 | %(head)s 3 | %(stylesheet)s 4 | %(body_prefix)s 5 | %(body_pre_docinfo)s 6 | %(docinfo)s 7 | %(body)s 8 | %(body_suffix)s 9 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/latex2e/default.tex: -------------------------------------------------------------------------------- 1 | $head_prefix% generated by Docutils 2 | \usepackage{cmap} % fix search and cut-and-paste in Acrobat 3 | $requirements 4 | %%% Custom LaTeX preamble 5 | $latex_preamble 6 | %%% User specified packages and stylesheets 7 | $stylesheet 8 | %%% Fallback definitions for Docutils-specific commands 9 | $fallbacks$pdfsetup 10 | $titledata 11 | %%% Body 12 | \begin{document} 13 | $body_pre_docinfo$docinfo$dedication$abstract$body 14 | \end{document} 15 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/latex2e/titlepage.tex: -------------------------------------------------------------------------------- 1 | % generated by Docutils 2 | $head_prefix 3 | \usepackage{fixltx2e} % LaTeX patches, \textsubscript 4 | \usepackage{cmap} % fix search and cut-and-paste in Acrobat 5 | $requirements 6 | %%% Custom LaTeX preamble 7 | $latex_preamble 8 | %%% User specified packages and stylesheets 9 | $stylesheet 10 | %%% Fallback definitions for Docutils-specific commands 11 | $fallbacks$pdfsetup 12 | $titledata 13 | %%% Body 14 | \begin{document} 15 | \begin{titlepage} 16 | $body_pre_docinfo$docinfo$dedication$abstract 17 | \thispagestyle{empty} 18 | \end{titlepage} 19 | $body 20 | \end{document} 21 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/latex2e/xelatex.tex: -------------------------------------------------------------------------------- 1 | $head_prefix% generated by Docutils 2 | % rubber: set program xelatex 3 | \usepackage{fontspec} 4 | % \defaultfontfeatures{Scale=MatchLowercase} 5 | % straight double quotes (defined T1 but missing in TU): 6 | \ifdefined \UnicodeEncodingName 7 | \DeclareTextCommand{\textquotedbl}{\UnicodeEncodingName}{% 8 | {\addfontfeatures{RawFeature=-tlig,Mapping=}\char34}}% 9 | \fi 10 | $requirements 11 | %%% Custom LaTeX preamble 12 | $latex_preamble 13 | %%% User specified packages and stylesheets 14 | $stylesheet 15 | %%% Fallback definitions for Docutils-specific commands 16 | $fallbacks$pdfsetup 17 | $titledata 18 | %%% Body 19 | \begin{document} 20 | $body_pre_docinfo$docinfo$dedication$abstract$body 21 | \end{document} 22 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/null.py: -------------------------------------------------------------------------------- 1 | # $Id: null.py 4564 2006-05-21 20:44:42Z wiemann $ 2 | # Author: David Goodger 3 | # Copyright: This module has been placed in the public domain. 4 | 5 | """ 6 | A do-nothing Writer. 7 | """ 8 | 9 | from docutils import writers 10 | 11 | 12 | class Writer(writers.UnfilteredWriter): 13 | 14 | supported = ('null',) 15 | """Formats this writer supports.""" 16 | 17 | config_section = 'null writer' 18 | config_section_dependencies = ('writers',) 19 | 20 | def translate(self): 21 | pass 22 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/odf_odt/styles.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/lib/docutils/writers/odf_odt/styles.odt -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/pep_html/template.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | PEP %(pep)s -- %(title)s 13 | %(stylesheet)s 14 | 15 | 16 | 18 | 22 | 27 |
28 | %(body)s 29 | %(body_suffix)s 30 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/pseudoxml.py: -------------------------------------------------------------------------------- 1 | # $Id: pseudoxml.py 7320 2012-01-19 22:33:02Z milde $ 2 | # Author: David Goodger 3 | # Copyright: This module has been placed in the public domain. 4 | 5 | """ 6 | Simple internal document tree Writer, writes indented pseudo-XML. 7 | """ 8 | 9 | __docformat__ = 'reStructuredText' 10 | 11 | 12 | from docutils import writers 13 | 14 | 15 | class Writer(writers.Writer): 16 | 17 | supported = ('pprint', 'pformat', 'pseudoxml') 18 | """Formats this writer supports.""" 19 | 20 | config_section = 'pseudoxml writer' 21 | config_section_dependencies = ('writers',) 22 | 23 | output = None 24 | """Final translated form of `document`.""" 25 | 26 | def translate(self): 27 | self.output = self.document.pformat() 28 | 29 | def supports(self, format): 30 | """This writer supports all format-specific elements.""" 31 | return True 32 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/README.txt: -------------------------------------------------------------------------------- 1 | Except where otherwise noted (default/iepngfix.htc), all files in this 2 | directory have been released into the Public Domain. 3 | 4 | These files are based on files from S5 1.1, released into the Public 5 | Domain by Eric Meyer. For further details, please see 6 | http://www.meyerweb.com/eric/tools/s5/credits.html. 7 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/big-black/__base__: -------------------------------------------------------------------------------- 1 | # base theme of this theme: 2 | big-white 3 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/big-black/framing.css: -------------------------------------------------------------------------------- 1 | /* The following styles size, place, and layer the slide components. 2 | Edit these if you want to change the overall slide layout. 3 | The commented lines can be uncommented (and modified, if necessary) 4 | to help you with the rearrangement process. */ 5 | 6 | /* target = 1024x768 */ 7 | 8 | div#header, div#footer, .slide {width: 100%; top: 0; left: 0;} 9 | div#header {top: 0; z-index: 1;} 10 | div#footer {display:none;} 11 | .slide {top: 0; width: 92%; padding: 0.1em 4% 4%; z-index: 2;} 12 | /* list-style: none;} */ 13 | div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;} 14 | div#controls form {position: absolute; bottom: 0; right: 0; width: 100%; 15 | margin: 0;} 16 | #currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; 17 | z-index: 10;} 18 | html>body #currentSlide {position: fixed;} 19 | 20 | /* 21 | div#header {background: #FCC;} 22 | div#footer {background: #CCF;} 23 | div#controls {background: #BBD;} 24 | div#currentSlide {background: #FFC;} 25 | */ 26 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/big-white/framing.css: -------------------------------------------------------------------------------- 1 | /* This file has been placed in the public domain. */ 2 | /* The following styles size, place, and layer the slide components. 3 | Edit these if you want to change the overall slide layout. 4 | The commented lines can be uncommented (and modified, if necessary) 5 | to help you with the rearrangement process. */ 6 | 7 | /* target = 1024x768 */ 8 | 9 | div#header, div#footer, .slide {width: 100%; top: 0; left: 0;} 10 | div#footer {display:none;} 11 | .slide {top: 0; width: 92%; padding: 0.25em 4% 4%; z-index: 2;} 12 | div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;} 13 | div#controls form {position: absolute; bottom: 0; right: 0; width: 100%; 14 | margin: 0;} 15 | #currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; 16 | z-index: 10;} 17 | html>body #currentSlide {position: fixed;} 18 | 19 | /* 20 | div#header {background: #FCC;} 21 | div#footer {background: #CCF;} 22 | div#controls {background: #BBD;} 23 | div#currentSlide {background: #FFC;} 24 | */ 25 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/default/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/lib/docutils/writers/s5_html/themes/default/blank.gif -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/default/framing.css: -------------------------------------------------------------------------------- 1 | /* This file has been placed in the public domain. */ 2 | /* The following styles size, place, and layer the slide components. 3 | Edit these if you want to change the overall slide layout. 4 | The commented lines can be uncommented (and modified, if necessary) 5 | to help you with the rearrangement process. */ 6 | 7 | /* target = 1024x768 */ 8 | 9 | div#header, div#footer, .slide {width: 100%; top: 0; left: 0;} 10 | div#header {position: fixed; top: 0; height: 3em; z-index: 1;} 11 | div#footer {top: auto; bottom: 0; height: 2.5em; z-index: 5;} 12 | .slide {top: 0; width: 92%; padding: 2.5em 4% 4%; z-index: 2;} 13 | div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;} 14 | div#controls form {position: absolute; bottom: 0; right: 0; width: 100%; 15 | margin: 0;} 16 | #currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; 17 | z-index: 10;} 18 | html>body #currentSlide {position: fixed;} 19 | 20 | /* 21 | div#header {background: #FCC;} 22 | div#footer {background: #CCF;} 23 | div#controls {background: #BBD;} 24 | div#currentSlide {background: #FFC;} 25 | */ 26 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/default/iepngfix.htc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 42 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/default/opera.css: -------------------------------------------------------------------------------- 1 | /* This file has been placed in the public domain. */ 2 | /* DO NOT CHANGE THESE unless you really want to break Opera Show */ 3 | .slide { 4 | visibility: visible !important; 5 | position: static !important; 6 | page-break-before: always; 7 | } 8 | #slide0 {page-break-before: avoid;} 9 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/default/outline.css: -------------------------------------------------------------------------------- 1 | /* This file has been placed in the public domain. */ 2 | /* Don't change this unless you want the layout stuff to show up in the 3 | outline view! */ 4 | 5 | .layout div, #footer *, #controlForm * {display: none;} 6 | #footer, #controls, #controlForm, #navLinks, #toggle { 7 | display: block; visibility: visible; margin: 0; padding: 0;} 8 | #toggle {float: right; padding: 0.5em;} 9 | html>body #toggle {position: fixed; top: 0; right: 0;} 10 | 11 | /* making the outline look pretty-ish */ 12 | 13 | #slide0 h1, #slide0 h2, #slide0 h3, #slide0 h4 {border: none; margin: 0;} 14 | #toggle {border: 1px solid; border-width: 0 0 1px 1px; background: #FFF;} 15 | 16 | .outline {display: inline ! important;} 17 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/default/print.css: -------------------------------------------------------------------------------- 1 | /* This file has been placed in the public domain. */ 2 | /* The following rule is necessary to have all slides appear in print! 3 | DO NOT REMOVE IT! */ 4 | .slide, ul {page-break-inside: avoid; visibility: visible !important;} 5 | h1 {page-break-after: avoid;} 6 | 7 | body {font-size: 12pt; background: white;} 8 | * {color: black;} 9 | 10 | #slide0 h1 {font-size: 200%; border: none; margin: 0.5em 0 0.25em;} 11 | #slide0 h3 {margin: 0; padding: 0;} 12 | #slide0 h4 {margin: 0 0 0.5em; padding: 0;} 13 | #slide0 {margin-bottom: 3em;} 14 | 15 | #header {display: none;} 16 | #footer h1 {margin: 0; border-bottom: 1px solid; color: gray; 17 | font-style: italic;} 18 | #footer h2, #controls {display: none;} 19 | 20 | .print {display: inline ! important;} 21 | 22 | /* The following rule keeps the layout stuff out of print. 23 | Remove at your own risk! */ 24 | .layout, .layout * {display: none !important;} 25 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/default/s5-core.css: -------------------------------------------------------------------------------- 1 | /* This file has been placed in the public domain. */ 2 | /* Do not edit or override these styles! 3 | The system will likely break if you do. */ 4 | 5 | div#header, div#footer, div#controls, .slide {position: absolute;} 6 | html>body div#header, html>body div#footer, 7 | html>body div#controls, html>body .slide {position: fixed;} 8 | .handout {display: none;} 9 | .layout {display: block;} 10 | .slide, .hideme, .incremental {visibility: hidden;} 11 | #slide0 {visibility: visible;} 12 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/default/slides.css: -------------------------------------------------------------------------------- 1 | /* This file has been placed in the public domain. */ 2 | 3 | /* required to make the slide show run at all */ 4 | @import url(s5-core.css); 5 | 6 | /* sets basic placement and size of slide components */ 7 | @import url(framing.css); 8 | 9 | /* styles that make the slides look good */ 10 | @import url(pretty.css); 11 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/medium-black/__base__: -------------------------------------------------------------------------------- 1 | # base theme of this theme: 2 | medium-white 3 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/medium-white/framing.css: -------------------------------------------------------------------------------- 1 | /* This file has been placed in the public domain. */ 2 | /* The following styles size, place, and layer the slide components. 3 | Edit these if you want to change the overall slide layout. 4 | The commented lines can be uncommented (and modified, if necessary) 5 | to help you with the rearrangement process. */ 6 | 7 | /* target = 1024x768 */ 8 | 9 | div#header, div#footer, .slide {width: 100%; top: 0; left: 0;} 10 | div#footer {top: auto; bottom: 0; height: 2.5em; z-index: 5;} 11 | .slide {top: 0; width: 92%; padding: 0.75em 4% 0 4%; z-index: 2;} 12 | div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;} 13 | div#controls form {position: absolute; bottom: 0; right: 0; width: 100%; 14 | margin: 0;} 15 | #currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; 16 | z-index: 10;} 17 | html>body #currentSlide {position: fixed;} 18 | 19 | /* 20 | div#header {background: #FCC;} 21 | div#footer {background: #CCF;} 22 | div#controls {background: #BBD;} 23 | div#currentSlide {background: #FFC;} 24 | */ 25 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/small-black/__base__: -------------------------------------------------------------------------------- 1 | # base theme of this theme: 2 | small-white 3 | -------------------------------------------------------------------------------- /blackmamba/lib/docutils/writers/s5_html/themes/small-white/framing.css: -------------------------------------------------------------------------------- 1 | /* This file has been placed in the public domain. */ 2 | /* The following styles size, place, and layer the slide components. 3 | Edit these if you want to change the overall slide layout. 4 | The commented lines can be uncommented (and modified, if necessary) 5 | to help you with the rearrangement process. */ 6 | 7 | /* target = 1024x768 */ 8 | 9 | div#header, div#footer, .slide {width: 100%; top: 0; left: 0;} 10 | div#footer {top: auto; bottom: 0; height: 2.5em; z-index: 5;} 11 | .slide {top: 0; width: 92%; padding: 1em 4% 0 4%; z-index: 2;} 12 | div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;} 13 | div#controls form {position: absolute; bottom: 0; right: 0; width: 100%; 14 | margin: 0;} 15 | #currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; 16 | z-index: 10;} 17 | html>body #currentSlide {position: fixed;} 18 | 19 | /* 20 | div#header {background: #FCC;} 21 | div#footer {background: #CCF;} 22 | div#controls {background: #BBD;} 23 | div#currentSlide {background: #FFC;} 24 | */ 25 | -------------------------------------------------------------------------------- /blackmamba/lib/flake8-3.5.0.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /blackmamba/lib/flake8-3.5.0.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.30.0) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | Tag: py3-none-any 6 | 7 | -------------------------------------------------------------------------------- /blackmamba/lib/flake8-3.5.0.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | flake8 2 | -------------------------------------------------------------------------------- /blackmamba/lib/flake8/__main__.py: -------------------------------------------------------------------------------- 1 | """Module allowing for ``python -m flake8 ...``.""" 2 | from flake8.main import cli 3 | 4 | cli.main() 5 | -------------------------------------------------------------------------------- /blackmamba/lib/flake8/api/__init__.py: -------------------------------------------------------------------------------- 1 | """Module containing all public entry-points for Flake8. 2 | 3 | This is the only submodule in Flake8 with a guaranteed stable API. All other 4 | submodules are considered internal only and are subject to change. 5 | """ 6 | -------------------------------------------------------------------------------- /blackmamba/lib/flake8/defaults.py: -------------------------------------------------------------------------------- 1 | """Constants that define defaults.""" 2 | import re 3 | 4 | EXCLUDE = ( 5 | '.svn', 6 | 'CVS', 7 | '.bzr', 8 | '.hg', 9 | '.git', 10 | '__pycache__', 11 | '.tox', 12 | '.eggs', 13 | '*.egg', 14 | ) 15 | IGNORE = ( 16 | 'E121', 17 | 'E123', 18 | 'E126', 19 | 'E226', 20 | 'E24', 21 | 'E704', 22 | 'W503', 23 | 'W504', 24 | ) 25 | SELECT = ('E', 'F', 'W', 'C90') 26 | MAX_LINE_LENGTH = 79 27 | 28 | TRUTHY_VALUES = {'true', '1', 't'} 29 | 30 | # Other constants 31 | WHITESPACE = frozenset(' \t') 32 | 33 | STATISTIC_NAMES = ( 34 | 'logical lines', 35 | 'physical lines', 36 | 'tokens', 37 | ) 38 | 39 | NOQA_INLINE_REGEXP = re.compile( 40 | # We're looking for items that look like this: 41 | # ``# noqa`` 42 | # ``# noqa: E123`` 43 | # ``# noqa: E123,W451,F921`` 44 | # ``# NoQA: E123,W451,F921`` 45 | # ``# NOQA: E123,W451,F921`` 46 | # We do not care about the ``: `` that follows ``noqa`` 47 | # We do not care about the casing of ``noqa`` 48 | # We want a comma-separated list of errors 49 | '# noqa(?:: (?P([A-Z][0-9]+(?:[,\s]+)?)+))?', 50 | re.IGNORECASE 51 | ) 52 | 53 | NOQA_FILE = re.compile(r'\s*# flake8[:=]\s*noqa', re.I) 54 | -------------------------------------------------------------------------------- /blackmamba/lib/flake8/formatting/__init__.py: -------------------------------------------------------------------------------- 1 | """Submodule containing the default formatters for Flake8.""" 2 | -------------------------------------------------------------------------------- /blackmamba/lib/flake8/main/__init__.py: -------------------------------------------------------------------------------- 1 | """Module containing the logic for the Flake8 entry-points.""" 2 | -------------------------------------------------------------------------------- /blackmamba/lib/flake8/main/cli.py: -------------------------------------------------------------------------------- 1 | """Command-line implementation of flake8.""" 2 | from flake8.main import application 3 | 4 | 5 | def main(argv=None): 6 | # type: (Union[NoneType, List[str]]) -> NoneType 7 | """Execute the main bit of the application. 8 | 9 | This handles the creation of an instance of :class:`Application`, runs it, 10 | and then exits the application. 11 | 12 | :param list argv: 13 | The arguments to be passed to the application for parsing. 14 | """ 15 | app = application.Application() 16 | app.run(argv) 17 | app.exit() 18 | -------------------------------------------------------------------------------- /blackmamba/lib/flake8/main/vcs.py: -------------------------------------------------------------------------------- 1 | """Module containing some of the logic for our VCS installation logic.""" 2 | from flake8 import exceptions as exc 3 | from flake8.main import git 4 | from flake8.main import mercurial 5 | 6 | 7 | # NOTE(sigmavirus24): In the future, we may allow for VCS hooks to be defined 8 | # as plugins, e.g., adding a flake8.vcs entry-point. In that case, this 9 | # dictionary should disappear, and this module might contain more code for 10 | # managing those bits (in conjuntion with flake8.plugins.manager). 11 | _INSTALLERS = { 12 | 'git': git.install, 13 | 'mercurial': mercurial.install, 14 | } 15 | 16 | 17 | def install(option, option_string, value, parser): 18 | """Determine which version control hook to install. 19 | 20 | For more information about the callback signature, see: 21 | https://docs.python.org/2/library/optparse.html#optparse-option-callbacks 22 | """ 23 | installer = _INSTALLERS.get(value) 24 | errored = False 25 | successful = False 26 | try: 27 | successful = installer() 28 | except exc.HookInstallationError as hook_error: 29 | print(str(hook_error)) 30 | errored = True 31 | 32 | if not successful: 33 | print('Could not find the {0} directory'.format(value)) 34 | raise SystemExit(not successful and errored) 35 | 36 | 37 | def choices(): 38 | """Return the list of VCS choices.""" 39 | return list(_INSTALLERS) 40 | -------------------------------------------------------------------------------- /blackmamba/lib/flake8/options/__init__.py: -------------------------------------------------------------------------------- 1 | """Package containing the option manager and config management logic. 2 | 3 | - :mod:`flake8.options.config` contains the logic for finding, parsing, and 4 | merging configuration files. 5 | 6 | - :mod:`flake8.options.manager` contains the logic for managing customized 7 | Flake8 command-line and configuration options. 8 | 9 | - :mod:`flake8.options.aggregator` uses objects from both of the above modules 10 | to aggregate configuration into one object used by plugins and Flake8. 11 | 12 | """ 13 | -------------------------------------------------------------------------------- /blackmamba/lib/flake8/plugins/__init__.py: -------------------------------------------------------------------------------- 1 | """Submodule of built-in plugins and plugin managers.""" 2 | -------------------------------------------------------------------------------- /blackmamba/lib/flake8/plugins/notifier.py: -------------------------------------------------------------------------------- 1 | """Implementation of the class that registers and notifies listeners.""" 2 | from flake8.plugins import _trie 3 | 4 | 5 | class Notifier(object): 6 | """Object that tracks and notifies listener objects.""" 7 | 8 | def __init__(self): 9 | """Initialize an empty notifier object.""" 10 | self.listeners = _trie.Trie() 11 | 12 | def listeners_for(self, error_code): 13 | """Retrieve listeners for an error_code. 14 | 15 | There may be listeners registered for E1, E100, E101, E110, E112, and 16 | E126. To get all the listeners for one of E100, E101, E110, E112, or 17 | E126 you would also need to incorporate the listeners for E1 (since 18 | they're all in the same class). 19 | 20 | Example usage: 21 | 22 | .. code-block:: python 23 | 24 | from flake8 import notifier 25 | 26 | n = notifier.Notifier() 27 | # register listeners 28 | for listener in n.listeners_for('W102'): 29 | listener.notify(...) 30 | """ 31 | path = error_code 32 | while path: 33 | node = self.listeners.find(path) 34 | listeners = getattr(node, 'data', []) 35 | for listener in listeners: 36 | yield listener 37 | path = path[:-1] 38 | 39 | def notify(self, error_code, *args, **kwargs): 40 | """Notify all listeners for the specified error code.""" 41 | for listener in self.listeners_for(error_code): 42 | listener.notify(error_code, *args, **kwargs) 43 | 44 | def register_listener(self, error_code, listener): 45 | """Register a listener for a specific error_code.""" 46 | self.listeners.add(error_code, listener) 47 | -------------------------------------------------------------------------------- /blackmamba/lib/future-0.16.0.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /blackmamba/lib/future-0.16.0.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.29.0) 3 | Root-Is-Purelib: true 4 | Tag: cp36-none-any 5 | 6 | -------------------------------------------------------------------------------- /blackmamba/lib/future-0.16.0.dist-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [console_scripts] 2 | futurize = libfuturize.main:main 3 | pasteurize = libpasteurize.main:main 4 | 5 | -------------------------------------------------------------------------------- /blackmamba/lib/future-0.16.0.dist-info/metadata.json: -------------------------------------------------------------------------------- 1 | {"classifiers": ["Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "License :: OSI Approved", "License :: OSI Approved :: MIT License", "Development Status :: 4 - Beta", "Intended Audience :: Developers"], "extensions": {"python.commands": {"wrap_console": {"futurize": "libfuturize.main:main", "pasteurize": "libpasteurize.main:main"}}, "python.details": {"contacts": [{"email": "ed@pythoncharmers.com", "name": "Ed Schofield", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://python-future.org"}}, "python.exports": {"console_scripts": {"futurize": "libfuturize.main:main", "pasteurize": "libpasteurize.main:main"}}}, "generator": "bdist_wheel (0.29.0)", "keywords": ["future", "past", "python3", "migration", "futurize", "backport", "six", "2to3", "modernize", "pasteurize", "3to2"], "license": "MIT", "metadata_version": "2.0", "name": "future", "summary": "Clean single-source support for Python 3 and 2", "test_requires": [{"requires": []}], "version": "0.16.0"} -------------------------------------------------------------------------------- /blackmamba/lib/future-0.16.0.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | future 2 | libfuturize 3 | libpasteurize 4 | past 5 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | future.backports package 3 | """ 4 | 5 | from __future__ import absolute_import 6 | 7 | import sys 8 | 9 | __future_module__ = True 10 | from future.standard_library import import_top_level_modules 11 | 12 | 13 | if sys.version_info[0] == 3: 14 | import_top_level_modules() 15 | 16 | 17 | from .misc import (ceil, 18 | OrderedDict, 19 | Counter, 20 | ChainMap, 21 | check_output, 22 | count, 23 | recursive_repr, 24 | _count_elements, 25 | cmp_to_key 26 | ) 27 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/email/mime/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/lib/future/backports/email/mime/__init__.py -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/email/mime/application.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2001-2006 Python Software Foundation 2 | # Author: Keith Dart 3 | # Contact: email-sig@python.org 4 | 5 | """Class representing application/* type MIME documents.""" 6 | from __future__ import unicode_literals 7 | from __future__ import division 8 | from __future__ import absolute_import 9 | 10 | from future.backports.email import encoders 11 | from future.backports.email.mime.nonmultipart import MIMENonMultipart 12 | 13 | __all__ = ["MIMEApplication"] 14 | 15 | 16 | class MIMEApplication(MIMENonMultipart): 17 | """Class for generating application/* MIME documents.""" 18 | 19 | def __init__(self, _data, _subtype='octet-stream', 20 | _encoder=encoders.encode_base64, **_params): 21 | """Create an application/* type MIME document. 22 | 23 | _data is a string containing the raw application data. 24 | 25 | _subtype is the MIME content type subtype, defaulting to 26 | 'octet-stream'. 27 | 28 | _encoder is a function which will perform the actual encoding for 29 | transport of the application data, defaulting to base64 encoding. 30 | 31 | Any additional keyword arguments are passed to the base class 32 | constructor, which turns them into parameters on the Content-Type 33 | header. 34 | """ 35 | if _subtype is None: 36 | raise TypeError('Invalid application MIME subtype') 37 | MIMENonMultipart.__init__(self, 'application', _subtype, **_params) 38 | self.set_payload(_data) 39 | _encoder(self) 40 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/email/mime/base.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2001-2006 Python Software Foundation 2 | # Author: Barry Warsaw 3 | # Contact: email-sig@python.org 4 | 5 | """Base class for MIME specializations.""" 6 | from __future__ import absolute_import, division, unicode_literals 7 | from future.backports.email import message 8 | 9 | __all__ = ['MIMEBase'] 10 | 11 | 12 | class MIMEBase(message.Message): 13 | """Base class for MIME specializations.""" 14 | 15 | def __init__(self, _maintype, _subtype, **_params): 16 | """This constructor adds a Content-Type: and a MIME-Version: header. 17 | 18 | The Content-Type: header is taken from the _maintype and _subtype 19 | arguments. Additional parameters for this header are taken from the 20 | keyword arguments. 21 | """ 22 | message.Message.__init__(self) 23 | ctype = '%s/%s' % (_maintype, _subtype) 24 | self.add_header('Content-Type', ctype, **_params) 25 | self['MIME-Version'] = '1.0' 26 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/email/mime/message.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2001-2006 Python Software Foundation 2 | # Author: Barry Warsaw 3 | # Contact: email-sig@python.org 4 | 5 | """Class representing message/* MIME documents.""" 6 | from __future__ import unicode_literals 7 | from __future__ import division 8 | from __future__ import absolute_import 9 | 10 | __all__ = ['MIMEMessage'] 11 | 12 | from future.backports.email import message 13 | from future.backports.email.mime.nonmultipart import MIMENonMultipart 14 | 15 | 16 | class MIMEMessage(MIMENonMultipart): 17 | """Class representing message/* MIME documents.""" 18 | 19 | def __init__(self, _msg, _subtype='rfc822'): 20 | """Create a message/* type MIME document. 21 | 22 | _msg is a message object and must be an instance of Message, or a 23 | derived class of Message, otherwise a TypeError is raised. 24 | 25 | Optional _subtype defines the subtype of the contained message. The 26 | default is "rfc822" (this is defined by the MIME standard, even though 27 | the term "rfc822" is technically outdated by RFC 2822). 28 | """ 29 | MIMENonMultipart.__init__(self, 'message', _subtype) 30 | if not isinstance(_msg, message.Message): 31 | raise TypeError('Argument is not an instance of Message') 32 | # It's convenient to use this base class method. We need to do it 33 | # this way or we'll get an exception 34 | message.Message.attach(self, _msg) 35 | # And be sure our default type is set correctly 36 | self.set_default_type('message/rfc822') 37 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/email/mime/multipart.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2002-2006 Python Software Foundation 2 | # Author: Barry Warsaw 3 | # Contact: email-sig@python.org 4 | 5 | """Base class for MIME multipart/* type messages.""" 6 | from __future__ import unicode_literals 7 | from __future__ import division 8 | from __future__ import absolute_import 9 | 10 | __all__ = ['MIMEMultipart'] 11 | 12 | from future.backports.email.mime.base import MIMEBase 13 | 14 | 15 | class MIMEMultipart(MIMEBase): 16 | """Base class for MIME multipart/* type messages.""" 17 | 18 | def __init__(self, _subtype='mixed', boundary=None, _subparts=None, 19 | **_params): 20 | """Creates a multipart/* type message. 21 | 22 | By default, creates a multipart/mixed message, with proper 23 | Content-Type and MIME-Version headers. 24 | 25 | _subtype is the subtype of the multipart content type, defaulting to 26 | `mixed'. 27 | 28 | boundary is the multipart boundary string. By default it is 29 | calculated as needed. 30 | 31 | _subparts is a sequence of initial subparts for the payload. It 32 | must be an iterable object, such as a list. You can always 33 | attach new subparts to the message by using the attach() method. 34 | 35 | Additional parameters for the Content-Type header are taken from the 36 | keyword arguments (or passed into the _params argument). 37 | """ 38 | MIMEBase.__init__(self, 'multipart', _subtype, **_params) 39 | 40 | # Initialise _payload to an empty list as the Message superclass's 41 | # implementation of is_multipart assumes that _payload is a list for 42 | # multipart messages. 43 | self._payload = [] 44 | 45 | if _subparts: 46 | for p in _subparts: 47 | self.attach(p) 48 | if boundary: 49 | self.set_boundary(boundary) 50 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/email/mime/nonmultipart.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2002-2006 Python Software Foundation 2 | # Author: Barry Warsaw 3 | # Contact: email-sig@python.org 4 | 5 | """Base class for MIME type messages that are not multipart.""" 6 | from __future__ import unicode_literals 7 | from __future__ import division 8 | from __future__ import absolute_import 9 | 10 | __all__ = ['MIMENonMultipart'] 11 | 12 | from future.backports.email import errors 13 | from future.backports.email.mime.base import MIMEBase 14 | 15 | 16 | class MIMENonMultipart(MIMEBase): 17 | """Base class for MIME multipart/* type messages.""" 18 | 19 | def attach(self, payload): 20 | # The public API prohibits attaching multiple subparts to MIMEBase 21 | # derived subtypes since none of them are, by definition, of content 22 | # type multipart/* 23 | raise errors.MultipartConversionError( 24 | 'Cannot attach additional subparts to non-multipart/*') 25 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/email/mime/text.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2001-2006 Python Software Foundation 2 | # Author: Barry Warsaw 3 | # Contact: email-sig@python.org 4 | 5 | """Class representing text/* type MIME documents.""" 6 | from __future__ import unicode_literals 7 | from __future__ import division 8 | from __future__ import absolute_import 9 | 10 | __all__ = ['MIMEText'] 11 | 12 | from future.backports.email.encoders import encode_7or8bit 13 | from future.backports.email.mime.nonmultipart import MIMENonMultipart 14 | 15 | 16 | class MIMEText(MIMENonMultipart): 17 | """Class for generating text/* type MIME documents.""" 18 | 19 | def __init__(self, _text, _subtype='plain', _charset=None): 20 | """Create a text/* type MIME document. 21 | 22 | _text is the string for this message object. 23 | 24 | _subtype is the MIME sub content type, defaulting to "plain". 25 | 26 | _charset is the character set parameter added to the Content-Type 27 | header. This defaults to "us-ascii". Note that as a side-effect, the 28 | Content-Transfer-Encoding header will also be set. 29 | """ 30 | 31 | # If no _charset was specified, check to see if there are non-ascii 32 | # characters present. If not, use 'us-ascii', otherwise use utf-8. 33 | # XXX: This can be removed once #7304 is fixed. 34 | if _charset is None: 35 | try: 36 | _text.encode('us-ascii') 37 | _charset = 'us-ascii' 38 | except UnicodeEncodeError: 39 | _charset = 'utf-8' 40 | 41 | MIMENonMultipart.__init__(self, 'text', _subtype, 42 | **{'charset': _charset}) 43 | 44 | self.set_payload(_text, _charset) 45 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/html/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | General functions for HTML manipulation, backported from Py3. 3 | 4 | Note that this uses Python 2.7 code with the corresponding Python 3 5 | module names and locations. 6 | """ 7 | 8 | from __future__ import unicode_literals 9 | 10 | 11 | _escape_map = {ord('&'): '&', ord('<'): '<', ord('>'): '>'} 12 | _escape_map_full = {ord('&'): '&', ord('<'): '<', ord('>'): '>', 13 | ord('"'): '"', ord('\''): '''} 14 | 15 | # NB: this is a candidate for a bytes/string polymorphic interface 16 | 17 | def escape(s, quote=True): 18 | """ 19 | Replace special characters "&", "<" and ">" to HTML-safe sequences. 20 | If the optional flag quote is true (the default), the quotation mark 21 | characters, both double quote (") and single quote (') characters are also 22 | translated. 23 | """ 24 | assert not isinstance(s, bytes), 'Pass a unicode string' 25 | if quote: 26 | return s.translate(_escape_map_full) 27 | return s.translate(_escape_map) 28 | 29 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/http/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/lib/future/backports/http/__init__.py -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/test/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | test package backported for python-future. 3 | 4 | Its primary purpose is to allow use of "import test.support" for running 5 | the Python standard library unit tests using the new Python 3 stdlib 6 | import location. 7 | 8 | Python 3 renamed test.test_support to test.support. 9 | """ 10 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/test/dh512.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MEYCQQD1Kv884bEpQBgRjXyEpwpy1obEAxnIByl6ypUM2Zafq9AKUJsCRtMIPWak 3 | XUGfnHy9iUsiGSa6q6Jew1XpKgVfAgEC 4 | -----END DH PARAMETERS----- 5 | 6 | These are the 512 bit DH parameters from "Assigned Number for SKIP Protocols" 7 | (http://www.skip-vpn.org/spec/numbers.html). 8 | See there for how they were generated. 9 | Note that g is not a generator, but this is not a problem since p is a safe prime. 10 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/test/keycert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANtb0+YrKuxevGpm 3 | LrjaUhZSgz6zFAmuGFmKmUbdjmfv9zSmmdsQIksK++jK0Be9LeZy20j6ahOfuVa0 4 | ufEmPoP7Fy4hXegKZR9cCWcIe/A6H2xWF1IIJLRTLaU8ol/I7T+um5HD5AwAwNPP 5 | USNU0Eegmvp+xxWu3NX2m1Veot85AgMBAAECgYA3ZdZ673X0oexFlq7AAmrutkHt 6 | CL7LvwrpOiaBjhyTxTeSNWzvtQBkIU8DOI0bIazA4UreAFffwtvEuPmonDb3F+Iq 7 | SMAu42XcGyVZEl+gHlTPU9XRX7nTOXVt+MlRRRxL6t9GkGfUAXI3XxJDXW3c0vBK 8 | UL9xqD8cORXOfE06rQJBAP8mEX1ERkR64Ptsoe4281vjTlNfIbs7NMPkUnrn9N/Y 9 | BLhjNIfQ3HFZG8BTMLfX7kCS9D593DW5tV4Z9BP/c6cCQQDcFzCcVArNh2JSywOQ 10 | ZfTfRbJg/Z5Lt9Fkngv1meeGNPgIMLN8Sg679pAOOWmzdMO3V706rNPzSVMME7E5 11 | oPIfAkEA8pDddarP5tCvTTgUpmTFbakm0KoTZm2+FzHcnA4jRh+XNTjTOv98Y6Ik 12 | eO5d1ZnKXseWvkZncQgxfdnMqqpj5wJAcNq/RVne1DbYlwWchT2Si65MYmmJ8t+F 13 | 0mcsULqjOnEMwf5e+ptq5LzwbyrHZYq5FNk7ocufPv/ZQrcSSC+cFwJBAKvOJByS 14 | x56qyGeZLOQlWS2JS3KJo59XuLFGqcbgN9Om9xFa41Yb4N9NvplFivsvZdw3m1Q/ 15 | SPIXQuT8RMPDVNQ= 16 | -----END PRIVATE KEY----- 17 | -----BEGIN CERTIFICATE----- 18 | MIICVDCCAb2gAwIBAgIJANfHOBkZr8JOMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNV 19 | BAYTAlhZMRcwFQYDVQQHEw5DYXN0bGUgQW50aHJheDEjMCEGA1UEChMaUHl0aG9u 20 | IFNvZnR3YXJlIEZvdW5kYXRpb24xEjAQBgNVBAMTCWxvY2FsaG9zdDAeFw0xMDEw 21 | MDgyMzAxNTZaFw0yMDEwMDUyMzAxNTZaMF8xCzAJBgNVBAYTAlhZMRcwFQYDVQQH 22 | Ew5DYXN0bGUgQW50aHJheDEjMCEGA1UEChMaUHl0aG9uIFNvZnR3YXJlIEZvdW5k 23 | YXRpb24xEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAw 24 | gYkCgYEA21vT5isq7F68amYuuNpSFlKDPrMUCa4YWYqZRt2OZ+/3NKaZ2xAiSwr7 25 | 6MrQF70t5nLbSPpqE5+5VrS58SY+g/sXLiFd6AplH1wJZwh78DofbFYXUggktFMt 26 | pTyiX8jtP66bkcPkDADA089RI1TQR6Ca+n7HFa7c1fabVV6i3zkCAwEAAaMYMBYw 27 | FAYDVR0RBA0wC4IJbG9jYWxob3N0MA0GCSqGSIb3DQEBBQUAA4GBAHPctQBEQ4wd 28 | BJ6+JcpIraopLn8BGhbjNWj40mmRqWB/NAWF6M5ne7KpGAu7tLeG4hb1zLaldK8G 29 | lxy2GPSRF6LFS48dpEj2HbMv2nvv6xxalDMJ9+DicWgAKTQ6bcX2j3GUkCR0g/T1 30 | CRlNBAAlvhKzO7Clpf9l0YKBEfraJByX 31 | -----END CERTIFICATE----- 32 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/test/keycert2.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJnsJZVrppL+W5I9 3 | zGQrrawWwE5QJpBK9nWw17mXrZ03R1cD9BamLGivVISbPlRlAVnZBEyh1ATpsB7d 4 | CUQ+WHEvALquvx4+Yw5l+fXeiYRjrLRBYZuVy8yNtXzU3iWcGObcYRkUdiXdOyP7 5 | sLF2YZHRvQZpzgDBKkrraeQ81w21AgMBAAECgYBEm7n07FMHWlE+0kT0sXNsLYfy 6 | YE+QKZnJw9WkaDN+zFEEPELkhZVt5BjsMraJr6v2fIEqF0gGGJPkbenffVq2B5dC 7 | lWUOxvJHufMK4sM3Cp6s/gOp3LP+QkzVnvJSfAyZU6l+4PGX5pLdUsXYjPxgzjzL 8 | S36tF7/2Uv1WePyLUQJBAMsPhYzUXOPRgmbhcJiqi9A9c3GO8kvSDYTCKt3VMnqz 9 | HBn6MQ4VQasCD1F+7jWTI0FU/3vdw8non/Fj8hhYqZcCQQDCDRdvmZqDiZnpMqDq 10 | L6ZSrLTVtMvZXZbgwForaAD9uHj51TME7+eYT7EG2YCgJTXJ4YvRJEnPNyskwdKt 11 | vTSTAkEAtaaN/vyemEJ82BIGStwONNw0ILsSr5cZ9tBHzqiA/tipY+e36HRFiXhP 12 | QcU9zXlxyWkDH8iz9DSAmE2jbfoqwwJANlMJ65E543cjIlitGcKLMnvtCCLcKpb7 13 | xSG0XJB6Lo11OKPJ66jp0gcFTSCY1Lx2CXVd+gfJrfwI1Pp562+bhwJBAJ9IfDPU 14 | R8OpO9v1SGd8x33Owm7uXOpB9d63/T70AD1QOXjKUC4eXYbt0WWfWuny/RNPRuyh 15 | w7DXSfUF+kPKolU= 16 | -----END PRIVATE KEY----- 17 | -----BEGIN CERTIFICATE----- 18 | MIICXTCCAcagAwIBAgIJAIO3upAG445fMA0GCSqGSIb3DQEBBQUAMGIxCzAJBgNV 19 | BAYTAlhZMRcwFQYDVQQHEw5DYXN0bGUgQW50aHJheDEjMCEGA1UEChMaUHl0aG9u 20 | IFNvZnR3YXJlIEZvdW5kYXRpb24xFTATBgNVBAMTDGZha2Vob3N0bmFtZTAeFw0x 21 | MDEwMDkxNTAxMDBaFw0yMDEwMDYxNTAxMDBaMGIxCzAJBgNVBAYTAlhZMRcwFQYD 22 | VQQHEw5DYXN0bGUgQW50aHJheDEjMCEGA1UEChMaUHl0aG9uIFNvZnR3YXJlIEZv 23 | dW5kYXRpb24xFTATBgNVBAMTDGZha2Vob3N0bmFtZTCBnzANBgkqhkiG9w0BAQEF 24 | AAOBjQAwgYkCgYEAmewllWumkv5bkj3MZCutrBbATlAmkEr2dbDXuZetnTdHVwP0 25 | FqYsaK9UhJs+VGUBWdkETKHUBOmwHt0JRD5YcS8Auq6/Hj5jDmX59d6JhGOstEFh 26 | m5XLzI21fNTeJZwY5txhGRR2Jd07I/uwsXZhkdG9BmnOAMEqSutp5DzXDbUCAwEA 27 | AaMbMBkwFwYDVR0RBBAwDoIMZmFrZWhvc3RuYW1lMA0GCSqGSIb3DQEBBQUAA4GB 28 | AH+iMClLLGSaKWgwXsmdVo4FhTZZHo8Uprrtg3N9FxEeE50btpDVQysgRt5ias3K 29 | m+bME9zbKwvbVWD5zZdjus4pDgzwF/iHyccL8JyYhxOvS/9zmvAtFXj/APIIbZFp 30 | IT75d9f88ScIGEtknZQejnrdhB64tYki/EqluiuKBqKD 31 | -----END CERTIFICATE----- 32 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/test/nullcert.pem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/lib/future/backports/test/nullcert.pem -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/test/ssl_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICVDCCAb2gAwIBAgIJANfHOBkZr8JOMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNV 3 | BAYTAlhZMRcwFQYDVQQHEw5DYXN0bGUgQW50aHJheDEjMCEGA1UEChMaUHl0aG9u 4 | IFNvZnR3YXJlIEZvdW5kYXRpb24xEjAQBgNVBAMTCWxvY2FsaG9zdDAeFw0xMDEw 5 | MDgyMzAxNTZaFw0yMDEwMDUyMzAxNTZaMF8xCzAJBgNVBAYTAlhZMRcwFQYDVQQH 6 | Ew5DYXN0bGUgQW50aHJheDEjMCEGA1UEChMaUHl0aG9uIFNvZnR3YXJlIEZvdW5k 7 | YXRpb24xEjAQBgNVBAMTCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAw 8 | gYkCgYEA21vT5isq7F68amYuuNpSFlKDPrMUCa4YWYqZRt2OZ+/3NKaZ2xAiSwr7 9 | 6MrQF70t5nLbSPpqE5+5VrS58SY+g/sXLiFd6AplH1wJZwh78DofbFYXUggktFMt 10 | pTyiX8jtP66bkcPkDADA089RI1TQR6Ca+n7HFa7c1fabVV6i3zkCAwEAAaMYMBYw 11 | FAYDVR0RBA0wC4IJbG9jYWxob3N0MA0GCSqGSIb3DQEBBQUAA4GBAHPctQBEQ4wd 12 | BJ6+JcpIraopLn8BGhbjNWj40mmRqWB/NAWF6M5ne7KpGAu7tLeG4hb1zLaldK8G 13 | lxy2GPSRF6LFS48dpEj2HbMv2nvv6xxalDMJ9+DicWgAKTQ6bcX2j3GUkCR0g/T1 14 | CRlNBAAlvhKzO7Clpf9l0YKBEfraJByX 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/test/ssl_key.passwd.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | Proc-Type: 4,ENCRYPTED 3 | DEK-Info: DES-EDE3-CBC,1A8D9D2A02EC698A 4 | 5 | kJYbfZ8L0sfe9Oty3gw0aloNnY5E8fegRfQLZlNoxTl6jNt0nIwI8kDJ36CZgR9c 6 | u3FDJm/KqrfUoz8vW+qEnWhSG7QPX2wWGPHd4K94Yz/FgrRzZ0DoK7XxXq9gOtVA 7 | AVGQhnz32p+6WhfGsCr9ArXEwRZrTk/FvzEPaU5fHcoSkrNVAGX8IpSVkSDwEDQr 8 | Gv17+cfk99UV1OCza6yKHoFkTtrC+PZU71LomBabivS2Oc4B9hYuSR2hF01wTHP+ 9 | YlWNagZOOVtNz4oKK9x9eNQpmfQXQvPPTfusexKIbKfZrMvJoxcm1gfcZ0H/wK6P 10 | 6wmXSG35qMOOztCZNtperjs1wzEBXznyK8QmLcAJBjkfarABJX9vBEzZV0OUKhy+ 11 | noORFwHTllphbmydLhu6ehLUZMHPhzAS5UN7srtpSN81eerDMy0RMUAwA7/PofX1 12 | 94Me85Q8jP0PC9ETdsJcPqLzAPETEYu0ELewKRcrdyWi+tlLFrpE5KT/s5ecbl9l 13 | 7B61U4Kfd1PIXc/siINhU3A3bYK+845YyUArUOnKf1kEox7p1RpD7yFqVT04lRTo 14 | cibNKATBusXSuBrp2G6GNuhWEOSafWCKJQAzgCYIp6ZTV2khhMUGppc/2H3CF6cO 15 | zX0KtlPVZC7hLkB6HT8SxYUwF1zqWY7+/XPPdc37MeEZ87Q3UuZwqORLY+Z0hpgt 16 | L5JXBCoklZhCAaN2GqwFLXtGiRSRFGY7xXIhbDTlE65Wv1WGGgDLMKGE1gOz3yAo 17 | 2jjG1+yAHJUdE69XTFHSqSkvaloA1W03LdMXZ9VuQJ/ySXCie6ABAQ== 18 | -----END RSA PRIVATE KEY----- 19 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/test/ssl_key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANtb0+YrKuxevGpm 3 | LrjaUhZSgz6zFAmuGFmKmUbdjmfv9zSmmdsQIksK++jK0Be9LeZy20j6ahOfuVa0 4 | ufEmPoP7Fy4hXegKZR9cCWcIe/A6H2xWF1IIJLRTLaU8ol/I7T+um5HD5AwAwNPP 5 | USNU0Eegmvp+xxWu3NX2m1Veot85AgMBAAECgYA3ZdZ673X0oexFlq7AAmrutkHt 6 | CL7LvwrpOiaBjhyTxTeSNWzvtQBkIU8DOI0bIazA4UreAFffwtvEuPmonDb3F+Iq 7 | SMAu42XcGyVZEl+gHlTPU9XRX7nTOXVt+MlRRRxL6t9GkGfUAXI3XxJDXW3c0vBK 8 | UL9xqD8cORXOfE06rQJBAP8mEX1ERkR64Ptsoe4281vjTlNfIbs7NMPkUnrn9N/Y 9 | BLhjNIfQ3HFZG8BTMLfX7kCS9D593DW5tV4Z9BP/c6cCQQDcFzCcVArNh2JSywOQ 10 | ZfTfRbJg/Z5Lt9Fkngv1meeGNPgIMLN8Sg679pAOOWmzdMO3V706rNPzSVMME7E5 11 | oPIfAkEA8pDddarP5tCvTTgUpmTFbakm0KoTZm2+FzHcnA4jRh+XNTjTOv98Y6Ik 12 | eO5d1ZnKXseWvkZncQgxfdnMqqpj5wJAcNq/RVne1DbYlwWchT2Si65MYmmJ8t+F 13 | 0mcsULqjOnEMwf5e+ptq5LzwbyrHZYq5FNk7ocufPv/ZQrcSSC+cFwJBAKvOJByS 14 | x56qyGeZLOQlWS2JS3KJo59XuLFGqcbgN9Om9xFa41Yb4N9NvplFivsvZdw3m1Q/ 15 | SPIXQuT8RMPDVNQ= 16 | -----END PRIVATE KEY----- 17 | -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/urllib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/lib/future/backports/urllib/__init__.py -------------------------------------------------------------------------------- /blackmamba/lib/future/backports/xmlrpc/__init__.py: -------------------------------------------------------------------------------- 1 | # This directory is a Python package. 2 | -------------------------------------------------------------------------------- /blackmamba/lib/future/builtins/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | A module that brings in equivalents of the new and modified Python 3 3 | builtins into Py2. Has no effect on Py3. 4 | 5 | See the docs `here `_ 6 | (``docs/what-else.rst``) for more information. 7 | 8 | """ 9 | 10 | from future.builtins.iterators import (filter, map, zip) 11 | # The isinstance import is no longer needed. We provide it only for 12 | # backward-compatibility with future v0.8.2. It will be removed in future v1.0. 13 | from future.builtins.misc import (ascii, chr, hex, input, isinstance, next, 14 | oct, open, pow, round, super) 15 | from future.utils import PY3 16 | 17 | if PY3: 18 | import builtins 19 | bytes = builtins.bytes 20 | dict = builtins.dict 21 | int = builtins.int 22 | list = builtins.list 23 | object = builtins.object 24 | range = builtins.range 25 | str = builtins.str 26 | __all__ = [] 27 | else: 28 | from future.types import (newbytes as bytes, 29 | newdict as dict, 30 | newint as int, 31 | newlist as list, 32 | newobject as object, 33 | newrange as range, 34 | newstr as str) 35 | from future import utils 36 | 37 | 38 | if not utils.PY3: 39 | # We only import names that shadow the builtins on Py2. No other namespace 40 | # pollution on Py2. 41 | 42 | # Only shadow builtins on Py2; no new names 43 | __all__ = ['filter', 'map', 'zip', 44 | 'ascii', 'chr', 'hex', 'input', 'next', 'oct', 'open', 'pow', 45 | 'round', 'super', 46 | 'bytes', 'dict', 'int', 'list', 'object', 'range', 'str', 47 | ] 48 | 49 | else: 50 | # No namespace pollution on Py3 51 | __all__ = [] 52 | -------------------------------------------------------------------------------- /blackmamba/lib/future/builtins/iterators.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module is designed to be used as follows:: 3 | 4 | from future.builtins.iterators import * 5 | 6 | And then, for example:: 7 | 8 | for i in range(10**15): 9 | pass 10 | 11 | for (a, b) in zip(range(10**15), range(-10**15, 0)): 12 | pass 13 | 14 | Note that this is standard Python 3 code, plus some imports that do 15 | nothing on Python 3. 16 | 17 | The iterators this brings in are:: 18 | 19 | - ``range`` 20 | - ``filter`` 21 | - ``map`` 22 | - ``zip`` 23 | 24 | On Python 2, ``range`` is a pure-Python backport of Python 3's ``range`` 25 | iterator with slicing support. The other iterators (``filter``, ``map``, 26 | ``zip``) are from the ``itertools`` module on Python 2. On Python 3 these 27 | are available in the module namespace but not exported for * imports via 28 | __all__ (zero no namespace pollution). 29 | 30 | Note that these are also available in the standard library 31 | ``future_builtins`` module on Python 2 -- but not Python 3, so using 32 | the standard library version is not portable, nor anywhere near complete. 33 | """ 34 | 35 | from __future__ import division, absolute_import, print_function 36 | 37 | import itertools 38 | from future import utils 39 | 40 | if not utils.PY3: 41 | filter = itertools.ifilter 42 | map = itertools.imap 43 | from future.types import newrange as range 44 | zip = itertools.izip 45 | __all__ = ['filter', 'map', 'range', 'zip'] 46 | else: 47 | import builtins 48 | filter = builtins.filter 49 | map = builtins.map 50 | range = builtins.range 51 | zip = builtins.zip 52 | __all__ = [] 53 | 54 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/__init__.py: -------------------------------------------------------------------------------- 1 | # future.moves package 2 | from __future__ import absolute_import 3 | import sys 4 | __future_module__ = True 5 | from future.standard_library import import_top_level_modules 6 | 7 | if sys.version_info[0] == 3: 8 | import_top_level_modules() 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/_dummy_thread.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from _dummy_thread import * 6 | else: 7 | __future_module__ = True 8 | from dummy_thread import * 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/_markupbase.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from _markupbase import * 6 | else: 7 | __future_module__ = True 8 | from markupbase import * 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/_thread.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from _thread import * 6 | else: 7 | __future_module__ = True 8 | from thread import * 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/builtins.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from builtins import * 6 | else: 7 | __future_module__ = True 8 | from __builtin__ import * 9 | # Overwrite any old definitions with the equivalent future.builtins ones: 10 | from future.builtins import * 11 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/collections.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | import sys 3 | 4 | from future.utils import PY2, PY26 5 | __future_module__ = True 6 | 7 | from collections import * 8 | 9 | if PY2: 10 | from UserDict import UserDict 11 | from UserList import UserList 12 | from UserString import UserString 13 | 14 | if PY26: 15 | from future.backports.misc import OrderedDict, Counter 16 | 17 | if sys.version_info < (3, 3): 18 | from future.backports.misc import ChainMap, _count_elements 19 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/configparser.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY2 4 | 5 | if PY2: 6 | from ConfigParser import * 7 | else: 8 | from configparser import * 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/copyreg.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from copyreg import * 6 | else: 7 | __future_module__ = True 8 | from copy_reg import * 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/dbm/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from dbm import * 6 | else: 7 | __future_module__ = True 8 | from whichdb import * 9 | from anydbm import * 10 | 11 | # Py3.3's dbm/__init__.py imports ndbm but doesn't expose it via __all__. 12 | # In case some (badly written) code depends on dbm.ndbm after import dbm, 13 | # we simulate this: 14 | if PY3: 15 | from dbm import ndbm 16 | else: 17 | try: 18 | from future.moves.dbm import ndbm 19 | except ImportError: 20 | ndbm = None 21 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/dbm/dumb.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from dbm.dumb import * 7 | else: 8 | __future_module__ = True 9 | from dumbdbm import * 10 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/dbm/gnu.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from dbm.gnu import * 7 | else: 8 | __future_module__ = True 9 | from gdbm import * 10 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/dbm/ndbm.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from dbm.ndbm import * 7 | else: 8 | __future_module__ = True 9 | from dbm import * 10 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/html/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | __future_module__ = True 4 | 5 | if PY3: 6 | from html import * 7 | else: 8 | # cgi.escape isn't good enough for the single Py3.3 html test to pass. 9 | # Define it inline here instead. From the Py3.4 stdlib. Note that the 10 | # html.escape() function from the Py3.3 stdlib is not suitable for use on 11 | # Py2.x. 12 | """ 13 | General functions for HTML manipulation. 14 | """ 15 | 16 | def escape(s, quote=True): 17 | """ 18 | Replace special characters "&", "<" and ">" to HTML-safe sequences. 19 | If the optional flag quote is true (the default), the quotation mark 20 | characters, both double quote (") and single quote (') characters are also 21 | translated. 22 | """ 23 | s = s.replace("&", "&") # Must be done first! 24 | s = s.replace("<", "<") 25 | s = s.replace(">", ">") 26 | if quote: 27 | s = s.replace('"', """) 28 | s = s.replace('\'', "'") 29 | return s 30 | 31 | __all__ = ['escape'] 32 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/html/entities.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from html.entities import * 6 | else: 7 | __future_module__ = True 8 | from htmlentitydefs import * 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/html/parser.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | __future_module__ = True 4 | 5 | if PY3: 6 | from html.parser import * 7 | else: 8 | from HTMLParser import * 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/http/__init__.py: -------------------------------------------------------------------------------- 1 | from future.utils import PY3 2 | 3 | if not PY3: 4 | __future_module__ = True 5 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/http/client.py: -------------------------------------------------------------------------------- 1 | from future.utils import PY3 2 | 3 | if PY3: 4 | from http.client import * 5 | else: 6 | from httplib import * 7 | from httplib import HTTPMessage 8 | __future_module__ = True 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/http/cookiejar.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from http.cookiejar import * 6 | else: 7 | __future_module__ = True 8 | from cookielib import * 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/http/cookies.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from http.cookies import * 6 | else: 7 | __future_module__ = True 8 | from Cookie import * 9 | from Cookie import Morsel # left out of __all__ on Py2.7! 10 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/http/server.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from http.server import * 6 | else: 7 | __future_module__ = True 8 | from BaseHTTPServer import * 9 | from CGIHTTPServer import * 10 | from SimpleHTTPServer import * 11 | try: 12 | from CGIHTTPServer import _url_collapse_path # needed for a test 13 | except ImportError: 14 | try: 15 | # Python 2.7.0 to 2.7.3 16 | from CGIHTTPServer import ( 17 | _url_collapse_path_split as _url_collapse_path) 18 | except ImportError: 19 | # Doesn't exist on Python 2.6.x. Ignore it. 20 | pass 21 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/itertools.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from itertools import * 4 | try: 5 | zip_longest = izip_longest 6 | filterfalse = ifilterfalse 7 | except NameError: 8 | pass 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/pickle.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from pickle import * 6 | else: 7 | __future_module__ = True 8 | try: 9 | from cPickle import * 10 | except ImportError: 11 | from pickle import * 12 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/queue.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from queue import * 6 | else: 7 | __future_module__ = True 8 | from Queue import * 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/reprlib.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from reprlib import * 6 | else: 7 | __future_module__ = True 8 | from repr import * 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/socketserver.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from socketserver import * 6 | else: 7 | __future_module__ = True 8 | from SocketServer import * 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/subprocess.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY2, PY26 3 | 4 | from subprocess import * 5 | 6 | if PY2: 7 | __future_module__ = True 8 | from commands import getoutput, getstatusoutput 9 | 10 | if PY26: 11 | from future.backports.misc import check_output 12 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/sys.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY2 4 | 5 | from sys import * 6 | 7 | if PY2: 8 | from __builtin__ import intern 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/test/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if not PY3: 5 | __future_module__ = True 6 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/test/support.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.standard_library import suspend_hooks 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from test.support import * 7 | else: 8 | __future_module__ = True 9 | with suspend_hooks(): 10 | from test.test_support import * 11 | 12 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/tkinter/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | __future_module__ = True 4 | 5 | if not PY3: 6 | from Tkinter import * 7 | from Tkinter import (_cnfmerge, _default_root, _flatten, _join, _setit, 8 | _splitdict, _stringify, _support_default_root, _test, 9 | _tkinter) 10 | else: 11 | from tkinter import * 12 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/tkinter/colorchooser.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from tkinter.colorchooser import * 7 | else: 8 | try: 9 | from tkColorChooser import * 10 | except ImportError: 11 | raise ImportError('The tkColorChooser module is missing. Does your Py2 ' 12 | 'installation include tkinter?') 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/tkinter/commondialog.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from tkinter.commondialog import * 7 | else: 8 | try: 9 | from tkCommonDialog import * 10 | except ImportError: 11 | raise ImportError('The tkCommonDialog module is missing. Does your Py2 ' 12 | 'installation include tkinter?') 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/tkinter/constants.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from tkinter.constants import * 7 | else: 8 | try: 9 | from Tkconstants import * 10 | except ImportError: 11 | raise ImportError('The Tkconstants module is missing. Does your Py2 ' 12 | 'installation include tkinter?') 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/tkinter/dialog.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from tkinter.dialog import * 7 | else: 8 | try: 9 | from Dialog import * 10 | except ImportError: 11 | raise ImportError('The Dialog module is missing. Does your Py2 ' 12 | 'installation include tkinter?') 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/tkinter/dnd.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from tkinter.dnd import * 7 | else: 8 | try: 9 | from Tkdnd import * 10 | except ImportError: 11 | raise ImportError('The Tkdnd module is missing. Does your Py2 ' 12 | 'installation include tkinter?') 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/tkinter/filedialog.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from tkinter.filedialog import * 7 | else: 8 | try: 9 | from FileDialog import * 10 | except ImportError: 11 | raise ImportError('The FileDialog module is missing. Does your Py2 ' 12 | 'installation include tkinter?') 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/tkinter/font.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from tkinter.font import * 7 | else: 8 | try: 9 | from tkFont import * 10 | except ImportError: 11 | raise ImportError('The tkFont module is missing. Does your Py2 ' 12 | 'installation include tkinter?') 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/tkinter/messagebox.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from tkinter.messagebox import * 7 | else: 8 | try: 9 | from tkMessageBox import * 10 | except ImportError: 11 | raise ImportError('The tkMessageBox module is missing. Does your Py2 ' 12 | 'installation include tkinter?') 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/tkinter/scrolledtext.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from tkinter.scrolledtext import * 7 | else: 8 | try: 9 | from ScrolledText import * 10 | except ImportError: 11 | raise ImportError('The ScrolledText module is missing. Does your Py2 ' 12 | 'installation include tkinter?') 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/tkinter/simpledialog.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from tkinter.simpledialog import * 7 | else: 8 | try: 9 | from SimpleDialog import * 10 | except ImportError: 11 | raise ImportError('The SimpleDialog module is missing. Does your Py2 ' 12 | 'installation include tkinter?') 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/tkinter/tix.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from tkinter.tix import * 7 | else: 8 | try: 9 | from Tix import * 10 | except ImportError: 11 | raise ImportError('The Tix module is missing. Does your Py2 ' 12 | 'installation include tkinter?') 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/tkinter/ttk.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from future.utils import PY3 4 | 5 | if PY3: 6 | from tkinter.ttk import * 7 | else: 8 | try: 9 | from ttk import * 10 | except ImportError: 11 | raise ImportError('The ttk module is missing. Does your Py2 ' 12 | 'installation include tkinter?') 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/urllib/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if not PY3: 5 | __future_module__ = True 6 | 7 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/urllib/error.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.standard_library import suspend_hooks 3 | 4 | from future.utils import PY3 5 | 6 | if PY3: 7 | from urllib.error import * 8 | else: 9 | __future_module__ = True 10 | 11 | # We use this method to get at the original Py2 urllib before any renaming magic 12 | # ContentTooShortError = sys.py2_modules['urllib'].ContentTooShortError 13 | 14 | with suspend_hooks(): 15 | from urllib import ContentTooShortError 16 | from urllib2 import URLError, HTTPError 17 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/urllib/parse.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.standard_library import suspend_hooks 3 | 4 | from future.utils import PY3 5 | 6 | if PY3: 7 | from urllib.parse import * 8 | else: 9 | __future_module__ = True 10 | from urlparse import (ParseResult, SplitResult, parse_qs, parse_qsl, 11 | urldefrag, urljoin, urlparse, urlsplit, 12 | urlunparse, urlunsplit) 13 | 14 | # we use this method to get at the original py2 urllib before any renaming 15 | # quote = sys.py2_modules['urllib'].quote 16 | # quote_plus = sys.py2_modules['urllib'].quote_plus 17 | # unquote = sys.py2_modules['urllib'].unquote 18 | # unquote_plus = sys.py2_modules['urllib'].unquote_plus 19 | # urlencode = sys.py2_modules['urllib'].urlencode 20 | # splitquery = sys.py2_modules['urllib'].splitquery 21 | 22 | with suspend_hooks(): 23 | from urllib import (quote, 24 | quote_plus, 25 | unquote, 26 | unquote_plus, 27 | urlencode, 28 | splitquery) 29 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/urllib/response.py: -------------------------------------------------------------------------------- 1 | from future import standard_library 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from urllib.response import * 6 | else: 7 | __future_module__ = True 8 | with standard_library.suspend_hooks(): 9 | from urllib import (addbase, 10 | addclosehook, 11 | addinfo, 12 | addinfourl) 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/urllib/robotparser.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from urllib.robotparser import * 6 | else: 7 | __future_module__ = True 8 | from robotparser import * 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/winreg.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from winreg import * 6 | else: 7 | __future_module__ = True 8 | from _winreg import * 9 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/xmlrpc/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/lib/future/moves/xmlrpc/__init__.py -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/xmlrpc/client.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from xmlrpc.client import * 6 | else: 7 | from xmlrpclib import * 8 | -------------------------------------------------------------------------------- /blackmamba/lib/future/moves/xmlrpc/server.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | from future.utils import PY3 3 | 4 | if PY3: 5 | from xmlrpc.server import * 6 | else: 7 | from xmlrpclib import * 8 | -------------------------------------------------------------------------------- /blackmamba/lib/future/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/lib/future/tests/__init__.py -------------------------------------------------------------------------------- /blackmamba/lib/future/types/newmemoryview.py: -------------------------------------------------------------------------------- 1 | """ 2 | A pretty lame implementation of a memoryview object for Python 2.6. 3 | """ 4 | 5 | from collections import Iterable 6 | from numbers import Integral 7 | import string 8 | 9 | from future.utils import istext, isbytes, PY3, with_metaclass 10 | from future.types import no, issubset 11 | 12 | 13 | # class BaseNewBytes(type): 14 | # def __instancecheck__(cls, instance): 15 | # return isinstance(instance, _builtin_bytes) 16 | 17 | 18 | class newmemoryview(object): # with_metaclass(BaseNewBytes, _builtin_bytes)): 19 | """ 20 | A pretty lame backport of the Python 2.7 and Python 3.x 21 | memoryviewview object to Py2.6. 22 | """ 23 | def __init__(self, obj): 24 | return obj 25 | 26 | 27 | __all__ = ['newmemoryview'] 28 | -------------------------------------------------------------------------------- /blackmamba/lib/future/types/newopen.py: -------------------------------------------------------------------------------- 1 | """ 2 | A substitute for the Python 3 open() function. 3 | 4 | Note that io.open() is more complete but maybe slower. Even so, the 5 | completeness may be a better default. TODO: compare these 6 | """ 7 | 8 | _builtin_open = open 9 | 10 | class newopen(object): 11 | """Wrapper providing key part of Python 3 open() interface. 12 | 13 | From IPython's py3compat.py module. License: BSD. 14 | """ 15 | def __init__(self, fname, mode="r", encoding="utf-8"): 16 | self.f = _builtin_open(fname, mode) 17 | self.enc = encoding 18 | 19 | def write(self, s): 20 | return self.f.write(s.encode(self.enc)) 21 | 22 | def read(self, size=-1): 23 | return self.f.read(size).decode(self.enc) 24 | 25 | def close(self): 26 | return self.f.close() 27 | 28 | def __enter__(self): 29 | return self 30 | 31 | def __exit__(self, etype, value, traceback): 32 | self.f.close() 33 | 34 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/__init__.py: -------------------------------------------------------------------------------- 1 | # empty to make this a package 2 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_add__future__imports_except_unicode_literals.py: -------------------------------------------------------------------------------- 1 | """ 2 | Fixer for adding: 3 | 4 | from __future__ import absolute_import 5 | from __future__ import division 6 | from __future__ import print_function 7 | 8 | This is "stage 1": hopefully uncontroversial changes. 9 | 10 | Stage 2 adds ``unicode_literals``. 11 | """ 12 | 13 | from lib2to3 import fixer_base 14 | from libfuturize.fixer_util import future_import 15 | 16 | class FixAddFutureImportsExceptUnicodeLiterals(fixer_base.BaseFix): 17 | BM_compatible = True 18 | PATTERN = "file_input" 19 | 20 | run_order = 9 21 | 22 | def transform(self, node, results): 23 | # Reverse order: 24 | future_import(u"print_function", node) 25 | future_import(u"division", node) 26 | future_import(u"absolute_import", node) 27 | 28 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_basestring.py: -------------------------------------------------------------------------------- 1 | """ 2 | Fixer that adds ``from past.builtins import basestring`` if there is a 3 | reference to ``basestring`` 4 | """ 5 | 6 | from lib2to3 import fixer_base 7 | 8 | from libfuturize.fixer_util import touch_import_top 9 | 10 | 11 | class FixBasestring(fixer_base.BaseFix): 12 | BM_compatible = True 13 | 14 | PATTERN = "'basestring'" 15 | 16 | def transform(self, node, results): 17 | touch_import_top(u'past.builtins', 'basestring', node) 18 | 19 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_bytes.py: -------------------------------------------------------------------------------- 1 | """Optional fixer that changes all unprefixed string literals "..." to b"...". 2 | 3 | br'abcd' is a SyntaxError on Python 2 but valid on Python 3. 4 | ur'abcd' is a SyntaxError on Python 3 but valid on Python 2. 5 | 6 | """ 7 | from __future__ import unicode_literals 8 | 9 | import re 10 | from lib2to3.pgen2 import token 11 | from lib2to3 import fixer_base 12 | 13 | _literal_re = re.compile(r"[^bBuUrR]?[\'\"]") 14 | 15 | class FixBytes(fixer_base.BaseFix): 16 | BM_compatible = True 17 | PATTERN = "STRING" 18 | 19 | def transform(self, node, results): 20 | if node.type == token.STRING: 21 | if _literal_re.match(node.value): 22 | new = node.clone() 23 | new.value = u'b' + new.value 24 | return new 25 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_cmp.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | """ 3 | Fixer for the cmp() function on Py2, which was removed in Py3. 4 | 5 | Adds this import line:: 6 | 7 | from past.builtins import cmp 8 | 9 | if cmp() is called in the code. 10 | """ 11 | 12 | from __future__ import unicode_literals 13 | from lib2to3 import fixer_base 14 | 15 | from libfuturize.fixer_util import touch_import_top 16 | 17 | 18 | expression = "name='cmp'" 19 | 20 | 21 | class FixCmp(fixer_base.BaseFix): 22 | BM_compatible = True 23 | run_order = 9 24 | 25 | PATTERN = """ 26 | power< 27 | ({0}) trailer< '(' args=[any] ')' > 28 | rest=any* > 29 | """.format(expression) 30 | 31 | def transform(self, node, results): 32 | name = results["name"] 33 | touch_import_top(u'past.builtins', name.value, node) 34 | 35 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_division.py: -------------------------------------------------------------------------------- 1 | """ 2 | UNFINISHED 3 | For the ``future`` package. 4 | 5 | Adds this import line: 6 | 7 | from __future__ import division 8 | 9 | at the top so the code runs identically on Py3 and Py2.6/2.7 10 | """ 11 | 12 | from libpasteurize.fixes.fix_division import FixDivision 13 | 14 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_execfile.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | """ 3 | Fixer for the execfile() function on Py2, which was removed in Py3. 4 | 5 | The Lib/lib2to3/fixes/fix_execfile.py module has some problems: see 6 | python-future issue #37. This fixer merely imports execfile() from 7 | past.builtins and leaves the code alone. 8 | 9 | Adds this import line:: 10 | 11 | from past.builtins import execfile 12 | 13 | for the function execfile() that was removed from Py3. 14 | """ 15 | 16 | from __future__ import unicode_literals 17 | from lib2to3 import fixer_base 18 | 19 | from libfuturize.fixer_util import touch_import_top 20 | 21 | 22 | expression = "name='execfile'" 23 | 24 | 25 | class FixExecfile(fixer_base.BaseFix): 26 | BM_compatible = True 27 | run_order = 9 28 | 29 | PATTERN = """ 30 | power< 31 | ({0}) trailer< '(' args=[any] ')' > 32 | rest=any* > 33 | """.format(expression) 34 | 35 | def transform(self, node, results): 36 | name = results["name"] 37 | touch_import_top(u'past.builtins', name.value, node) 38 | 39 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_future_standard_library.py: -------------------------------------------------------------------------------- 1 | """ 2 | For the ``future`` package. 3 | 4 | Changes any imports needed to reflect the standard library reorganization. Also 5 | Also adds these import lines: 6 | 7 | from future import standard_library 8 | standard_library.install_aliases() 9 | 10 | after any __future__ imports but before any other imports. 11 | """ 12 | 13 | from lib2to3.fixes.fix_imports import FixImports 14 | from libfuturize.fixer_util import touch_import_top 15 | 16 | 17 | class FixFutureStandardLibrary(FixImports): 18 | run_order = 8 19 | 20 | def transform(self, node, results): 21 | result = super(FixFutureStandardLibrary, self).transform(node, results) 22 | # TODO: add a blank line between any __future__ imports and this? 23 | touch_import_top(u'future', u'standard_library', node) 24 | return result 25 | 26 | 27 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_future_standard_library_urllib.py: -------------------------------------------------------------------------------- 1 | """ 2 | For the ``future`` package. 3 | 4 | A special fixer that ensures that these lines have been added:: 5 | 6 | from future import standard_library 7 | standard_library.install_hooks() 8 | 9 | even if the only module imported was ``urllib``, in which case the regular fixer 10 | wouldn't have added these lines. 11 | 12 | """ 13 | 14 | from lib2to3.fixes.fix_urllib import FixUrllib 15 | from libfuturize.fixer_util import touch_import_top, find_root 16 | 17 | 18 | class FixFutureStandardLibraryUrllib(FixUrllib): # not a subclass of FixImports 19 | run_order = 8 20 | 21 | def transform(self, node, results): 22 | # transform_member() in lib2to3/fixes/fix_urllib.py breaks node so find_root(node) 23 | # no longer works after the super() call below. So we find the root first: 24 | root = find_root(node) 25 | result = super(FixFutureStandardLibraryUrllib, self).transform(node, results) 26 | # TODO: add a blank line between any __future__ imports and this? 27 | touch_import_top(u'future', u'standard_library', root) 28 | return result 29 | 30 | 31 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_object.py: -------------------------------------------------------------------------------- 1 | """ 2 | Fixer that adds ``from builtins import object`` if there is a line 3 | like this: 4 | class Foo(object): 5 | """ 6 | 7 | from lib2to3 import fixer_base 8 | 9 | from libfuturize.fixer_util import touch_import_top 10 | 11 | 12 | class FixObject(fixer_base.BaseFix): 13 | 14 | PATTERN = u"classdef< 'class' NAME '(' name='object' ')' colon=':' any >" 15 | 16 | def transform(self, node, results): 17 | touch_import_top(u'builtins', 'object', node) 18 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_oldstr_wrap.py: -------------------------------------------------------------------------------- 1 | """ 2 | For the ``future`` package. 3 | 4 | Adds this import line: 5 | 6 | from past.builtins import str as oldstr 7 | 8 | at the top and wraps any unadorned string literals 'abc' or explicit byte-string 9 | literals b'abc' in oldstr() calls so the code has the same behaviour on Py3 as 10 | on Py2.6/2.7. 11 | """ 12 | 13 | from __future__ import unicode_literals 14 | import re 15 | from lib2to3 import fixer_base 16 | from lib2to3.pgen2 import token 17 | from lib2to3.fixer_util import syms 18 | from libfuturize.fixer_util import (future_import, touch_import_top, 19 | wrap_in_fn_call) 20 | 21 | 22 | _literal_re = re.compile(r"[^uUrR]?[\'\"]") 23 | 24 | 25 | class FixOldstrWrap(fixer_base.BaseFix): 26 | BM_compatible = True 27 | PATTERN = "STRING" 28 | 29 | def transform(self, node, results): 30 | if node.type == token.STRING: 31 | touch_import_top(u'past.types', u'oldstr', node) 32 | if _literal_re.match(node.value): 33 | new = node.clone() 34 | # Strip any leading space or comments: 35 | # TODO: check: do we really want to do this? 36 | new.prefix = u'' 37 | new.value = u'b' + new.value 38 | wrapped = wrap_in_fn_call("oldstr", [new], prefix=node.prefix) 39 | return wrapped 40 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_order___future__imports.py: -------------------------------------------------------------------------------- 1 | """ 2 | UNFINISHED 3 | 4 | Fixer for turning multiple lines like these: 5 | 6 | from __future__ import division 7 | from __future__ import absolute_import 8 | from __future__ import print_function 9 | 10 | into a single line like this: 11 | 12 | from __future__ import (absolute_import, division, print_function) 13 | 14 | This helps with testing of ``futurize``. 15 | """ 16 | 17 | from lib2to3 import fixer_base 18 | from libfuturize.fixer_util import future_import 19 | 20 | class FixOrderFutureImports(fixer_base.BaseFix): 21 | BM_compatible = True 22 | PATTERN = "file_input" 23 | 24 | run_order = 10 25 | 26 | # def match(self, node): 27 | # """ 28 | # Match only once per file 29 | # """ 30 | # if hasattr(node, 'type') and node.type == syms.file_input: 31 | # return True 32 | # return False 33 | 34 | def transform(self, node, results): 35 | # TODO # write me 36 | pass 37 | 38 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_print_with_import.py: -------------------------------------------------------------------------------- 1 | """ 2 | For the ``future`` package. 3 | 4 | Turns any print statements into functions and adds this import line: 5 | 6 | from __future__ import print_function 7 | 8 | at the top to retain compatibility with Python 2.6+. 9 | """ 10 | 11 | from libfuturize.fixes.fix_print import FixPrint 12 | from libfuturize.fixer_util import future_import 13 | 14 | class FixPrintWithImport(FixPrint): 15 | run_order = 7 16 | def transform(self, node, results): 17 | # Add the __future__ import first. (Otherwise any shebang or encoding 18 | # comment line attached as a prefix to the print statement will be 19 | # copied twice and appear twice.) 20 | future_import(u'print_function', node) 21 | n_stmt = super(FixPrintWithImport, self).transform(node, results) 22 | return n_stmt 23 | 24 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_remove_old__future__imports.py: -------------------------------------------------------------------------------- 1 | """ 2 | Fixer for removing any of these lines: 3 | 4 | from __future__ import with_statement 5 | from __future__ import nested_scopes 6 | from __future__ import generators 7 | 8 | The reason is that __future__ imports like these are required to be the first 9 | line of code (after docstrings) on Python 2.6+, which can get in the way. 10 | 11 | These imports are always enabled in Python 2.6+, which is the minimum sane 12 | version to target for Py2/3 compatibility. 13 | """ 14 | 15 | from lib2to3 import fixer_base 16 | from libfuturize.fixer_util import remove_future_import 17 | 18 | class FixRemoveOldFutureImports(fixer_base.BaseFix): 19 | BM_compatible = True 20 | PATTERN = "file_input" 21 | run_order = 1 22 | 23 | def transform(self, node, results): 24 | remove_future_import(u"with_statement", node) 25 | remove_future_import(u"nested_scopes", node) 26 | remove_future_import(u"generators", node) 27 | 28 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_unicode_keep_u.py: -------------------------------------------------------------------------------- 1 | """Fixer that changes unicode to str and unichr to chr, but -- unlike the 2 | lib2to3 fix_unicode.py fixer, does not change u"..." into "...". 3 | 4 | The reason is that Py3.3+ supports the u"..." string prefix, and, if 5 | present, the prefix may provide useful information for disambiguating 6 | between byte strings and unicode strings, which is often the hardest part 7 | of the porting task. 8 | 9 | """ 10 | 11 | from lib2to3.pgen2 import token 12 | from lib2to3 import fixer_base 13 | 14 | _mapping = {u"unichr" : u"chr", u"unicode" : u"str"} 15 | 16 | class FixUnicodeKeepU(fixer_base.BaseFix): 17 | BM_compatible = True 18 | PATTERN = "'unicode' | 'unichr'" 19 | 20 | def transform(self, node, results): 21 | if node.type == token.NAME: 22 | new = node.clone() 23 | new.value = _mapping[node.value] 24 | return new 25 | 26 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_unicode_literals_import.py: -------------------------------------------------------------------------------- 1 | """ 2 | Adds this import: 3 | 4 | from __future__ import unicode_literals 5 | 6 | """ 7 | 8 | from lib2to3 import fixer_base 9 | from libfuturize.fixer_util import future_import 10 | 11 | class FixUnicodeLiteralsImport(fixer_base.BaseFix): 12 | BM_compatible = True 13 | PATTERN = "file_input" 14 | 15 | run_order = 9 16 | 17 | def transform(self, node, results): 18 | future_import(u"unicode_literals", node) 19 | 20 | -------------------------------------------------------------------------------- /blackmamba/lib/libfuturize/fixes/fix_xrange_with_import.py: -------------------------------------------------------------------------------- 1 | """ 2 | For the ``future`` package. 3 | 4 | Turns any xrange calls into range calls and adds this import line: 5 | 6 | from builtins import range 7 | 8 | at the top. 9 | """ 10 | 11 | from lib2to3.fixes.fix_xrange import FixXrange 12 | 13 | from libfuturize.fixer_util import touch_import_top 14 | 15 | 16 | class FixXrangeWithImport(FixXrange): 17 | def transform(self, node, results): 18 | result = super(FixXrangeWithImport, self).transform(node, results) 19 | touch_import_top('builtins', 'range', node) 20 | return result 21 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/__init__.py: -------------------------------------------------------------------------------- 1 | # empty to make this a package 2 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_add_all__future__imports.py: -------------------------------------------------------------------------------- 1 | """ 2 | Fixer for adding: 3 | 4 | from __future__ import absolute_import 5 | from __future__ import division 6 | from __future__ import print_function 7 | from __future__ import unicode_literals 8 | 9 | This is done when converting from Py3 to both Py3/Py2. 10 | """ 11 | 12 | from lib2to3 import fixer_base 13 | from libfuturize.fixer_util import future_import 14 | 15 | class FixAddAllFutureImports(fixer_base.BaseFix): 16 | BM_compatible = True 17 | PATTERN = "file_input" 18 | run_order = 1 19 | 20 | def transform(self, node, results): 21 | future_import(u"unicode_literals", node) 22 | future_import(u"print_function", node) 23 | future_import(u"division", node) 24 | future_import(u"absolute_import", node) 25 | 26 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_add_all_future_builtins.py: -------------------------------------------------------------------------------- 1 | """ 2 | For the ``future`` package. 3 | 4 | Adds this import line:: 5 | 6 | from builtins import (ascii, bytes, chr, dict, filter, hex, input, 7 | int, list, map, next, object, oct, open, pow, 8 | range, round, str, super, zip) 9 | 10 | to a module, irrespective of whether each definition is used. 11 | 12 | Adds these imports after any other imports (in an initial block of them). 13 | """ 14 | 15 | from __future__ import unicode_literals 16 | 17 | from lib2to3 import fixer_base 18 | 19 | from libfuturize.fixer_util import touch_import_top 20 | 21 | 22 | class FixAddAllFutureBuiltins(fixer_base.BaseFix): 23 | BM_compatible = True 24 | PATTERN = "file_input" 25 | run_order = 1 26 | 27 | def transform(self, node, results): 28 | # import_str = """(ascii, bytes, chr, dict, filter, hex, input, 29 | # int, list, map, next, object, oct, open, pow, 30 | # range, round, str, super, zip)""" 31 | touch_import_top(u'builtins', '*', node) 32 | 33 | # builtins = """ascii bytes chr dict filter hex input 34 | # int list map next object oct open pow 35 | # range round str super zip""" 36 | # for builtin in sorted(builtins.split(), reverse=True): 37 | # touch_import_top(u'builtins', builtin, node) 38 | 39 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_add_future_standard_library_import.py: -------------------------------------------------------------------------------- 1 | """ 2 | For the ``future`` package. 3 | 4 | Adds this import line: 5 | 6 | from future import standard_library 7 | 8 | after any __future__ imports but before any other imports. Doesn't actually 9 | change the imports to Py3 style. 10 | """ 11 | 12 | from lib2to3 import fixer_base 13 | from libfuturize.fixer_util import touch_import_top 14 | 15 | class FixAddFutureStandardLibraryImport(fixer_base.BaseFix): 16 | BM_compatible = True 17 | PATTERN = "file_input" 18 | run_order = 8 19 | 20 | def transform(self, node, results): 21 | # TODO: add a blank line between any __future__ imports and this? 22 | touch_import_top(u'future', u'standard_library', node) 23 | # TODO: also add standard_library.install_hooks() 24 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_annotations.py: -------------------------------------------------------------------------------- 1 | u""" 2 | Fixer to remove function annotations 3 | """ 4 | 5 | from lib2to3 import fixer_base 6 | from lib2to3.pgen2 import token 7 | from lib2to3.fixer_util import syms 8 | 9 | warning_text = u"Removing function annotations completely." 10 | 11 | def param_without_annotations(node): 12 | return node.children[0] 13 | 14 | class FixAnnotations(fixer_base.BaseFix): 15 | 16 | warned = False 17 | 18 | def warn_once(self, node, reason): 19 | if not self.warned: 20 | self.warned = True 21 | self.warning(node, reason=reason) 22 | 23 | PATTERN = u""" 24 | funcdef< 'def' any parameters< '(' [params=any] ')' > ['->' ret=any] ':' any* > 25 | """ 26 | 27 | def transform(self, node, results): 28 | u""" 29 | This just strips annotations from the funcdef completely. 30 | """ 31 | params = results.get(u"params") 32 | ret = results.get(u"ret") 33 | if ret is not None: 34 | assert ret.prev_sibling.type == token.RARROW, u"Invalid return annotation" 35 | self.warn_once(node, reason=warning_text) 36 | ret.prev_sibling.remove() 37 | ret.remove() 38 | if params is None: return 39 | if params.type == syms.typedargslist: 40 | # more than one param in a typedargslist 41 | for param in params.children: 42 | if param.type == syms.tname: 43 | self.warn_once(node, reason=warning_text) 44 | param.replace(param_without_annotations(param)) 45 | elif params.type == syms.tname: 46 | # one param 47 | self.warn_once(node, reason=warning_text) 48 | params.replace(param_without_annotations(params)) 49 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_division.py: -------------------------------------------------------------------------------- 1 | u""" 2 | Fixer for division: from __future__ import division if needed 3 | """ 4 | 5 | from lib2to3 import fixer_base 6 | from libfuturize.fixer_util import token, future_import 7 | 8 | def match_division(node): 9 | u""" 10 | __future__.division redefines the meaning of a single slash for division, 11 | so we match that and only that. 12 | """ 13 | slash = token.SLASH 14 | return node.type == slash and not node.next_sibling.type == slash and \ 15 | not node.prev_sibling.type == slash 16 | 17 | class FixDivision(fixer_base.BaseFix): 18 | run_order = 4 # this seems to be ignored? 19 | 20 | def match(self, node): 21 | u""" 22 | Since the tree needs to be fixed once and only once if and only if it 23 | matches, then we can start discarding matches after we make the first. 24 | """ 25 | return match_division(node) 26 | 27 | def transform(self, node, results): 28 | future_import(u"division", node) 29 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_fullargspec.py: -------------------------------------------------------------------------------- 1 | u""" 2 | Fixer for getfullargspec -> getargspec 3 | """ 4 | 5 | from lib2to3 import fixer_base 6 | from lib2to3.fixer_util import Name 7 | 8 | warn_msg = u"some of the values returned by getfullargspec are not valid in Python 2 and have no equivalent." 9 | 10 | class FixFullargspec(fixer_base.BaseFix): 11 | 12 | PATTERN = u"'getfullargspec'" 13 | 14 | def transform(self, node, results): 15 | self.warning(node, warn_msg) 16 | return Name(u"getargspec", prefix=node.prefix) 17 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_future_builtins.py: -------------------------------------------------------------------------------- 1 | """ 2 | Adds this import line: 3 | 4 | from builtins import XYZ 5 | 6 | for each of the functions XYZ that is used in the module. 7 | """ 8 | 9 | from __future__ import unicode_literals 10 | 11 | from lib2to3 import fixer_base 12 | from lib2to3.pygram import python_symbols as syms 13 | from lib2to3.fixer_util import Name, Call, in_special_context 14 | 15 | from libfuturize.fixer_util import touch_import_top 16 | 17 | # All builtins are: 18 | # from future.builtins.iterators import (filter, map, zip) 19 | # from future.builtins.misc import (ascii, chr, hex, input, isinstance, oct, open, round, super) 20 | # from future.types import (bytes, dict, int, range, str) 21 | # We don't need isinstance any more. 22 | 23 | replaced_builtins = '''filter map zip 24 | ascii chr hex input next oct open round super 25 | bytes dict int range str'''.split() 26 | 27 | expression = '|'.join(["name='{0}'".format(name) for name in replaced_builtins]) 28 | 29 | 30 | class FixFutureBuiltins(fixer_base.BaseFix): 31 | BM_compatible = True 32 | run_order = 9 33 | 34 | # Currently we only match uses as a function. This doesn't match e.g.: 35 | # if isinstance(s, str): 36 | # ... 37 | PATTERN = """ 38 | power< 39 | ({0}) trailer< '(' args=[any] ')' > 40 | rest=any* > 41 | """.format(expression) 42 | 43 | def transform(self, node, results): 44 | name = results["name"] 45 | touch_import_top(u'builtins', name.value, node) 46 | # name.replace(Name(u"input", prefix=name.prefix)) 47 | 48 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_getcwd.py: -------------------------------------------------------------------------------- 1 | u""" 2 | Fixer for os.getcwd() -> os.getcwdu(). 3 | Also warns about "from os import getcwd", suggesting the above form. 4 | """ 5 | 6 | from lib2to3 import fixer_base 7 | from lib2to3.fixer_util import Name 8 | 9 | class FixGetcwd(fixer_base.BaseFix): 10 | 11 | PATTERN = u""" 12 | power< 'os' trailer< dot='.' name='getcwd' > any* > 13 | | 14 | import_from< 'from' 'os' 'import' bad='getcwd' > 15 | """ 16 | 17 | def transform(self, node, results): 18 | if u"name" in results: 19 | name = results[u"name"] 20 | name.replace(Name(u"getcwdu", prefix=name.prefix)) 21 | elif u"bad" in results: 22 | # Can't convert to getcwdu and then expect to catch every use. 23 | self.cannot_convert(node, u"import os, use os.getcwd() instead.") 24 | return 25 | else: 26 | raise ValueError(u"For some reason, the pattern matcher failed.") 27 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_memoryview.py: -------------------------------------------------------------------------------- 1 | u""" 2 | Fixer for memoryview(s) -> buffer(s). 3 | Explicit because some memoryview methods are invalid on buffer objects. 4 | """ 5 | 6 | from lib2to3 import fixer_base 7 | from lib2to3.fixer_util import Name 8 | 9 | 10 | class FixMemoryview(fixer_base.BaseFix): 11 | 12 | explicit = True # User must specify that they want this. 13 | 14 | PATTERN = u""" 15 | power< name='memoryview' trailer< '(' [any] ')' > 16 | rest=any* > 17 | """ 18 | 19 | def transform(self, node, results): 20 | name = results[u"name"] 21 | name.replace(Name(u"buffer", prefix=name.prefix)) 22 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_newstyle.py: -------------------------------------------------------------------------------- 1 | u""" 2 | Fixer for "class Foo: ..." -> "class Foo(object): ..." 3 | """ 4 | 5 | from lib2to3 import fixer_base 6 | from lib2to3.fixer_util import LParen, RParen, Name 7 | 8 | from libfuturize.fixer_util import touch_import_top 9 | 10 | 11 | def insert_object(node, idx): 12 | node.insert_child(idx, RParen()) 13 | node.insert_child(idx, Name(u"object")) 14 | node.insert_child(idx, LParen()) 15 | 16 | class FixNewstyle(fixer_base.BaseFix): 17 | 18 | # Match: 19 | # class Blah: 20 | # and: 21 | # class Blah(): 22 | 23 | PATTERN = u"classdef< 'class' NAME ['(' ')'] colon=':' any >" 24 | 25 | def transform(self, node, results): 26 | colon = results[u"colon"] 27 | idx = node.children.index(colon) 28 | if (node.children[idx-2].value == '(' and 29 | node.children[idx-1].value == ')'): 30 | del node.children[idx-2:idx] 31 | idx -= 2 32 | insert_object(node, idx) 33 | touch_import_top(u'builtins', 'object', node) 34 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_next.py: -------------------------------------------------------------------------------- 1 | u""" 2 | Fixer for: 3 | it.__next__() -> it.next(). 4 | next(it) -> it.next(). 5 | """ 6 | 7 | from lib2to3.pgen2 import token 8 | from lib2to3.pygram import python_symbols as syms 9 | from lib2to3 import fixer_base 10 | from lib2to3.fixer_util import Name, Call, find_binding, Attr 11 | 12 | bind_warning = u"Calls to builtin next() possibly shadowed by global binding" 13 | 14 | 15 | class FixNext(fixer_base.BaseFix): 16 | 17 | PATTERN = u""" 18 | power< base=any+ trailer< '.' attr='__next__' > any* > 19 | | 20 | power< head='next' trailer< '(' arg=any ')' > any* > 21 | | 22 | classdef< 'class' base=any+ ':' 23 | suite< any* 24 | funcdef< 'def' 25 | attr='__next__' 26 | parameters< '(' NAME ')' > any+ > 27 | any* > > 28 | """ 29 | 30 | def transform(self, node, results): 31 | assert results 32 | 33 | base = results.get(u"base") 34 | attr = results.get(u"attr") 35 | head = results.get(u"head") 36 | arg_ = results.get(u"arg") 37 | if arg_: 38 | arg = arg_.clone() 39 | head.replace(Attr(Name(unicode(arg),prefix=head.prefix), 40 | Name(u"next"))) 41 | arg_.remove() 42 | elif base: 43 | attr.replace(Name(u"next", prefix=attr.prefix)) 44 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_printfunction.py: -------------------------------------------------------------------------------- 1 | u""" 2 | Fixer for print: from __future__ import print_function. 3 | """ 4 | 5 | from lib2to3 import fixer_base 6 | from libfuturize.fixer_util import future_import 7 | 8 | class FixPrintfunction(fixer_base.BaseFix): 9 | 10 | # explicit = True 11 | 12 | PATTERN = u""" 13 | power< 'print' trailer < '(' any* ')' > any* > 14 | """ 15 | 16 | def transform(self, node, results): 17 | future_import(u"print_function", node) 18 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_raise.py: -------------------------------------------------------------------------------- 1 | u"""Fixer for 'raise E(V).with_traceback(T)' -> 'raise E, V, T'""" 2 | 3 | from lib2to3 import fixer_base 4 | from lib2to3.fixer_util import Comma, Node, Leaf, token, syms 5 | 6 | class FixRaise(fixer_base.BaseFix): 7 | 8 | PATTERN = u""" 9 | raise_stmt< 'raise' (power< name=any [trailer< '(' val=any* ')' >] 10 | [trailer< '.' 'with_traceback' > trailer< '(' trc=any ')' >] > | any) ['from' chain=any] >""" 11 | 12 | def transform(self, node, results): 13 | name, val, trc = (results.get(u"name"), results.get(u"val"), results.get(u"trc")) 14 | chain = results.get(u"chain") 15 | if chain is not None: 16 | self.warning(node, u"explicit exception chaining is not supported in Python 2") 17 | chain.prev_sibling.remove() 18 | chain.remove() 19 | if trc is not None: 20 | val = val[0] if val else Leaf(token.NAME, u"None") 21 | val.prefix = trc.prefix = u" " 22 | kids = [Leaf(token.NAME, u"raise"), name.clone(), Comma(), 23 | val.clone(), Comma(), trc.clone()] 24 | raise_stmt = Node(syms.raise_stmt, kids) 25 | node.replace(raise_stmt) 26 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_raise_.py: -------------------------------------------------------------------------------- 1 | u"""Fixer for 2 | raise E(V).with_traceback(T) 3 | to: 4 | from future.utils import raise_ 5 | ... 6 | raise_(E, V, T) 7 | 8 | TODO: FIXME!! 9 | 10 | """ 11 | 12 | from lib2to3 import fixer_base 13 | from lib2to3.fixer_util import Comma, Node, Leaf, token, syms 14 | 15 | class FixRaise(fixer_base.BaseFix): 16 | 17 | PATTERN = u""" 18 | raise_stmt< 'raise' (power< name=any [trailer< '(' val=any* ')' >] 19 | [trailer< '.' 'with_traceback' > trailer< '(' trc=any ')' >] > | any) ['from' chain=any] >""" 20 | 21 | def transform(self, node, results): 22 | FIXME 23 | name, val, trc = (results.get(u"name"), results.get(u"val"), results.get(u"trc")) 24 | chain = results.get(u"chain") 25 | if chain is not None: 26 | self.warning(node, u"explicit exception chaining is not supported in Python 2") 27 | chain.prev_sibling.remove() 28 | chain.remove() 29 | if trc is not None: 30 | val = val[0] if val else Leaf(token.NAME, u"None") 31 | val.prefix = trc.prefix = u" " 32 | kids = [Leaf(token.NAME, u"raise"), name.clone(), Comma(), 33 | val.clone(), Comma(), trc.clone()] 34 | raise_stmt = Node(syms.raise_stmt, kids) 35 | node.replace(raise_stmt) 36 | -------------------------------------------------------------------------------- /blackmamba/lib/libpasteurize/fixes/fix_throw.py: -------------------------------------------------------------------------------- 1 | u"""Fixer for 'g.throw(E(V).with_traceback(T))' -> 'g.throw(E, V, T)'""" 2 | 3 | from lib2to3 import fixer_base 4 | from lib2to3.pytree import Node, Leaf 5 | from lib2to3.pgen2 import token 6 | from lib2to3.fixer_util import Comma 7 | 8 | class FixThrow(fixer_base.BaseFix): 9 | 10 | PATTERN = u""" 11 | power< any trailer< '.' 'throw' > 12 | trailer< '(' args=power< exc=any trailer< '(' val=any* ')' > 13 | trailer< '.' 'with_traceback' > trailer< '(' trc=any ')' > > ')' > > 14 | """ 15 | 16 | def transform(self, node, results): 17 | syms = self.syms 18 | exc, val, trc = (results[u"exc"], results[u"val"], results[u"trc"]) 19 | val = val[0] if val else Leaf(token.NAME, u"None") 20 | val.prefix = trc.prefix = u" " 21 | kids = [exc.clone(), Comma(), val.clone(), Comma(), trc.clone()] 22 | args = results[u"args"] 23 | args.children = kids 24 | -------------------------------------------------------------------------------- /blackmamba/lib/mccabe-0.6.1-py3.6.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | LICENSE 2 | MANIFEST.in 3 | README.rst 4 | mccabe.py 5 | setup.cfg 6 | setup.py 7 | test_mccabe.py 8 | mccabe.egg-info/PKG-INFO 9 | mccabe.egg-info/SOURCES.txt 10 | mccabe.egg-info/dependency_links.txt 11 | mccabe.egg-info/entry_points.txt 12 | mccabe.egg-info/not-zip-safe 13 | mccabe.egg-info/top_level.txt -------------------------------------------------------------------------------- /blackmamba/lib/mccabe-0.6.1-py3.6.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /blackmamba/lib/mccabe-0.6.1-py3.6.egg-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [flake8.extension] 2 | C90 = mccabe:McCabeChecker 3 | 4 | -------------------------------------------------------------------------------- /blackmamba/lib/mccabe-0.6.1-py3.6.egg-info/not-zip-safe: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /blackmamba/lib/mccabe-0.6.1-py3.6.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | mccabe 2 | -------------------------------------------------------------------------------- /blackmamba/lib/pycodestyle-2.3.1-py3.6.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | CHANGES.txt 2 | CONTRIBUTING.rst 3 | MANIFEST.in 4 | README.rst 5 | dev-requirements.txt 6 | pycodestyle.py 7 | setup.cfg 8 | setup.py 9 | docs/Makefile 10 | docs/advanced.rst 11 | docs/api.rst 12 | docs/conf.py 13 | docs/developer.rst 14 | docs/index.rst 15 | docs/intro.rst 16 | docs/make.bat 17 | pycodestyle.egg-info/PKG-INFO 18 | pycodestyle.egg-info/SOURCES.txt 19 | pycodestyle.egg-info/dependency_links.txt 20 | pycodestyle.egg-info/entry_points.txt 21 | pycodestyle.egg-info/namespace_packages.txt 22 | pycodestyle.egg-info/not-zip-safe 23 | pycodestyle.egg-info/top_level.txt 24 | testsuite/.E30not.py.swp 25 | testsuite/E10.py 26 | testsuite/E11.py 27 | testsuite/E12.py 28 | testsuite/E12not.py 29 | testsuite/E20.py 30 | testsuite/E21.py 31 | testsuite/E22.py 32 | testsuite/E23.py 33 | testsuite/E24.py 34 | testsuite/E25.py 35 | testsuite/E26.py 36 | testsuite/E27.py 37 | testsuite/E30.py 38 | testsuite/E30not.py 39 | testsuite/E40.py 40 | testsuite/E50.py 41 | testsuite/E70.py 42 | testsuite/E71.py 43 | testsuite/E72.py 44 | testsuite/E73.py 45 | testsuite/E90.py 46 | testsuite/W19.py 47 | testsuite/W29.py 48 | testsuite/W39.py 49 | testsuite/W60.py 50 | testsuite/__init__.py 51 | testsuite/latin-1.py 52 | testsuite/noqa.py 53 | testsuite/python3.py 54 | testsuite/support.py 55 | testsuite/test_all.py 56 | testsuite/test_api.py 57 | testsuite/test_parser.py 58 | testsuite/test_shell.py 59 | testsuite/test_util.py 60 | testsuite/utf-8-bom.py 61 | testsuite/utf-8.py -------------------------------------------------------------------------------- /blackmamba/lib/pycodestyle-2.3.1-py3.6.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /blackmamba/lib/pycodestyle-2.3.1-py3.6.egg-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [console_scripts] 2 | pycodestyle = pycodestyle:_main 3 | 4 | -------------------------------------------------------------------------------- /blackmamba/lib/pycodestyle-2.3.1-py3.6.egg-info/namespace_packages.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /blackmamba/lib/pycodestyle-2.3.1-py3.6.egg-info/not-zip-safe: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /blackmamba/lib/pycodestyle-2.3.1-py3.6.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | pycodestyle 2 | -------------------------------------------------------------------------------- /blackmamba/lib/pyflakes-1.6.0.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /blackmamba/lib/pyflakes-1.6.0.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.26.0) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | Tag: py3-none-any 6 | 7 | -------------------------------------------------------------------------------- /blackmamba/lib/pyflakes-1.6.0.dist-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [console_scripts] 2 | pyflakes = pyflakes.api:main 3 | 4 | -------------------------------------------------------------------------------- /blackmamba/lib/pyflakes-1.6.0.dist-info/metadata.json: -------------------------------------------------------------------------------- 1 | {"classifiers": ["Development Status :: 6 - Mature", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development", "Topic :: Utilities"], "extensions": {"python.commands": {"wrap_console": {"pyflakes": "pyflakes.api:main"}}, "python.details": {"contacts": [{"email": "code-quality@python.org", "name": "A lot of people", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://github.com/PyCQA/pyflakes"}}, "python.exports": {"console_scripts": {"pyflakes": "pyflakes.api:main"}}}, "generator": "bdist_wheel (0.26.0)", "license": "MIT", "metadata_version": "2.0", "name": "pyflakes", "summary": "passive checker of Python programs", "version": "1.6.0"} -------------------------------------------------------------------------------- /blackmamba/lib/pyflakes-1.6.0.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | pyflakes 2 | -------------------------------------------------------------------------------- /blackmamba/lib/pyflakes/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = '1.6.0' 2 | -------------------------------------------------------------------------------- /blackmamba/lib/pyflakes/__main__.py: -------------------------------------------------------------------------------- 1 | from pyflakes.api import main 2 | 3 | # python -m pyflakes (with Python >= 2.7) 4 | if __name__ == '__main__': 5 | main(prog='pyflakes') 6 | -------------------------------------------------------------------------------- /blackmamba/lib/pyflakes/scripts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/lib/pyflakes/scripts/__init__.py -------------------------------------------------------------------------------- /blackmamba/lib/pyflakes/scripts/pyflakes.py: -------------------------------------------------------------------------------- 1 | """ 2 | Implementation of the command-line I{pyflakes} tool. 3 | """ 4 | from __future__ import absolute_import 5 | 6 | # For backward compatibility 7 | __all__ = ['check', 'checkPath', 'checkRecursive', 'iterSourceCode', 'main'] 8 | from pyflakes.api import check, checkPath, checkRecursive, iterSourceCode, main 9 | -------------------------------------------------------------------------------- /blackmamba/lib/pyflakes/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/lib/pyflakes/test/__init__.py -------------------------------------------------------------------------------- /blackmamba/lib/pyflakes/test/test_return_with_arguments_inside_generator.py: -------------------------------------------------------------------------------- 1 | 2 | from sys import version_info 3 | 4 | from pyflakes import messages as m 5 | from pyflakes.test.harness import TestCase, skipIf 6 | 7 | 8 | class Test(TestCase): 9 | @skipIf(version_info >= (3, 3), 'new in Python 3.3') 10 | def test_return(self): 11 | self.flakes(''' 12 | class a: 13 | def b(): 14 | for x in a.c: 15 | if x: 16 | yield x 17 | return a 18 | ''', m.ReturnWithArgsInsideGenerator) 19 | 20 | @skipIf(version_info >= (3, 3), 'new in Python 3.3') 21 | def test_returnNone(self): 22 | self.flakes(''' 23 | def a(): 24 | yield 12 25 | return None 26 | ''', m.ReturnWithArgsInsideGenerator) 27 | 28 | @skipIf(version_info >= (3, 3), 'new in Python 3.3') 29 | def test_returnYieldExpression(self): 30 | self.flakes(''' 31 | def a(): 32 | b = yield a 33 | return b 34 | ''', m.ReturnWithArgsInsideGenerator) 35 | -------------------------------------------------------------------------------- /blackmamba/lib/rope-0.10.7.dist-info/DESCRIPTION.rst: -------------------------------------------------------------------------------- 1 | 2 | b'\n.. _GitHub python-rope / rope: https://github.com/python-rope/rope\n\n\n========================================\n rope, a python refactoring library ...\n========================================\n\n\nOverview\n========\n\n`Rope`_ is a python refactoring library.\n\n.. _`rope`: https://github.com/python-rope/rope\n\n\nNotes\n============\n\n* Nick Smith takes over maintaining rope. Many thanks to\n Mat\xc4\x9bj Cepl for his work maintaining rope for the past few years!!\n* Full python3 support is in progress... stay tuned\n' 3 | 4 | 5 | -------------------------------------------------------------------------------- /blackmamba/lib/rope-0.10.7.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /blackmamba/lib/rope-0.10.7.dist-info/METADATA: -------------------------------------------------------------------------------- 1 | Metadata-Version: 2.0 2 | Name: rope 3 | Version: 0.10.7 4 | Summary: a python refactoring library... 5 | Home-page: https://github.com/python-rope/rope 6 | Author: Ali Gholami Rudi 7 | Author-email: aligrudi@users.sourceforge.net 8 | License: GNU GPL 9 | Platform: UNKNOWN 10 | Classifier: Development Status :: 4 - Beta 11 | Classifier: Operating System :: OS Independent 12 | Classifier: Environment :: X11 Applications 13 | Classifier: Environment :: Win32 (MS Windows) 14 | Classifier: Environment :: MacOS X 15 | Classifier: Intended Audience :: Developers 16 | Classifier: License :: OSI Approved :: GNU General Public License (GPL) 17 | Classifier: Natural Language :: English 18 | Classifier: Programming Language :: Python 19 | Classifier: Programming Language :: Python :: 2 20 | Classifier: Programming Language :: Python :: 2.6 21 | Classifier: Programming Language :: Python :: 2.7 22 | Classifier: Programming Language :: Python :: 3 23 | Classifier: Programming Language :: Python :: 3.2 24 | Classifier: Programming Language :: Python :: 3.3 25 | Classifier: Programming Language :: Python :: 3.4 26 | Classifier: Topic :: Software Development 27 | 28 | 29 | b'\n.. _GitHub python-rope / rope: https://github.com/python-rope/rope\n\n\n========================================\n rope, a python refactoring library ...\n========================================\n\n\nOverview\n========\n\n`Rope`_ is a python refactoring library.\n\n.. _`rope`: https://github.com/python-rope/rope\n\n\nNotes\n============\n\n* Nick Smith takes over maintaining rope. Many thanks to\n Mat\xc4\x9bj Cepl for his work maintaining rope for the past few years!!\n* Full python3 support is in progress... stay tuned\n' 30 | 31 | 32 | -------------------------------------------------------------------------------- /blackmamba/lib/rope-0.10.7.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.29.0) 3 | Root-Is-Purelib: true 4 | Tag: cp36-none-any 5 | 6 | -------------------------------------------------------------------------------- /blackmamba/lib/rope-0.10.7.dist-info/metadata.json: -------------------------------------------------------------------------------- 1 | {"classifiers": ["Development Status :: 4 - Beta", "Operating System :: OS Independent", "Environment :: X11 Applications", "Environment :: Win32 (MS Windows)", "Environment :: MacOS X", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development"], "extensions": {"python.details": {"contacts": [{"email": "aligrudi@users.sourceforge.net", "name": "Ali Gholami Rudi", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst"}, "project_urls": {"Home": "https://github.com/python-rope/rope"}}}, "generator": "bdist_wheel (0.29.0)", "license": "GNU GPL", "metadata_version": "2.0", "name": "rope", "summary": "a python refactoring library...", "version": "0.10.7"} -------------------------------------------------------------------------------- /blackmamba/lib/rope-0.10.7.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | rope 2 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/__init__.py: -------------------------------------------------------------------------------- 1 | """rope, a python refactoring library""" 2 | 3 | INFO = __doc__ 4 | VERSION = '0.10.7' 5 | COPYRIGHT = """\ 6 | Copyright (C) 2015-2016 Nicholas Smith 7 | Copyright (C) 2014-2015 Matej Cepl 8 | Copyright (C) 2006-2012 Ali Gholami Rudi 9 | Copyright (C) 2009-2012 Anton Gritsay 10 | 11 | This program is free software; you can redistribute it and/or modify it 12 | under the terms of GNU General Public License as published by the 13 | Free Software Foundation; either version 2 of the license, or (at your 14 | opinion) any later version. 15 | 16 | This program is distributed in the hope that it will be useful, 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | GNU General Public License for more details.""" 20 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/__init__.py: -------------------------------------------------------------------------------- 1 | """Base rope package 2 | 3 | This package contains rope core modules that are used by other modules 4 | and packages. 5 | 6 | """ 7 | 8 | __all__ = ['project', 'libutils', 'exceptions'] 9 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/astutils.py: -------------------------------------------------------------------------------- 1 | from rope.base import ast 2 | 3 | 4 | def get_name_levels(node): 5 | """Return a list of ``(name, level)`` tuples for assigned names 6 | 7 | The `level` is `None` for simple assignments and is a list of 8 | numbers for tuple assignments for example in:: 9 | 10 | a, (b, c) = x 11 | 12 | The levels for for `a` is ``[0]``, for `b` is ``[1, 0]`` and for 13 | `c` is ``[1, 1]``. 14 | 15 | """ 16 | visitor = _NodeNameCollector() 17 | ast.walk(node, visitor) 18 | return visitor.names 19 | 20 | 21 | class _NodeNameCollector(object): 22 | 23 | def __init__(self, levels=None): 24 | self.names = [] 25 | self.levels = levels 26 | self.index = 0 27 | 28 | def _add_node(self, node): 29 | new_levels = [] 30 | if self.levels is not None: 31 | new_levels = list(self.levels) 32 | new_levels.append(self.index) 33 | self.index += 1 34 | self._added(node, new_levels) 35 | 36 | def _added(self, node, levels): 37 | if hasattr(node, 'id'): 38 | self.names.append((node.id, levels)) 39 | 40 | def _Name(self, node): 41 | self._add_node(node) 42 | 43 | def _ExceptHandler(self, node): 44 | self.names.append((node.name, [])) 45 | 46 | def _Tuple(self, node): 47 | new_levels = [] 48 | if self.levels is not None: 49 | new_levels = list(self.levels) 50 | new_levels.append(self.index) 51 | self.index += 1 52 | visitor = _NodeNameCollector(new_levels) 53 | for child in ast.get_child_nodes(node): 54 | ast.walk(child, visitor) 55 | self.names.extend(visitor.names) 56 | 57 | def _Subscript(self, node): 58 | self._add_node(node) 59 | 60 | def _Attribute(self, node): 61 | self._add_node(node) 62 | 63 | def _Slice(self, node): 64 | self._add_node(node) 65 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/exceptions.py: -------------------------------------------------------------------------------- 1 | class RopeError(Exception): 2 | """Base exception for rope""" 3 | 4 | 5 | class ResourceNotFoundError(RopeError): 6 | """Resource not found exception""" 7 | 8 | 9 | class RefactoringError(RopeError): 10 | """Errors for performing a refactoring""" 11 | 12 | 13 | class InterruptedTaskError(RopeError): 14 | """The task has been interrupted""" 15 | 16 | 17 | class HistoryError(RopeError): 18 | """Errors for history undo/redo operations""" 19 | 20 | 21 | class ModuleNotFoundError(RopeError): 22 | """Module not found exception""" 23 | 24 | 25 | class AttributeNotFoundError(RopeError): 26 | """Attribute not found exception""" 27 | 28 | 29 | class NameNotFoundError(RopeError): 30 | """Name not found exception""" 31 | 32 | 33 | class BadIdentifierError(RopeError): 34 | """The name cannot be resolved""" 35 | 36 | 37 | class ModuleSyntaxError(RopeError): 38 | """Module has syntax errors 39 | 40 | The `filename` and `lineno` fields indicate where the error has 41 | occurred. 42 | 43 | """ 44 | 45 | def __init__(self, filename, lineno, message): 46 | self.filename = filename 47 | self.lineno = lineno 48 | self.message_ = message 49 | super(ModuleSyntaxError, self).__init__( 50 | 'Syntax error in file <%s> line <%s>: %s' % 51 | (filename, lineno, message)) 52 | 53 | 54 | class ModuleDecodeError(RopeError): 55 | """Cannot decode module""" 56 | 57 | def __init__(self, filename, message): 58 | self.filename = filename 59 | self.message_ = message 60 | super(ModuleDecodeError, self).__init__( 61 | 'Cannot decode file <%s>: %s' % (filename, message)) 62 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/oi/__init__.py: -------------------------------------------------------------------------------- 1 | """Rope object analysis and inference package 2 | 3 | Rope makes some simplifying assumptions about a python program. It 4 | assumes that a program only performs assignments and function calls. 5 | Tracking assignments is simple and `PyName` objects handle that. The 6 | main problem is function calls. Rope uses these two approaches for 7 | obtaining call information: 8 | 9 | * Static object analysis: `rope.base.pycore.PyCore.analyze_module()` 10 | 11 | It can analyze modules to obtain information about functions. This 12 | is done by analyzing function calls in a module or scope. Currently 13 | SOA analyzes the scopes that are changed while saving or when the 14 | user asks to analyze a module. That is mainly because static 15 | analysis is time-consuming. 16 | 17 | * Dynamic object analysis: `rope.base.pycore.PyCore.run_module()` 18 | 19 | When you run a module or your testsuite, when DOA is enabled, it 20 | collects information about parameters passed to and objects returned 21 | from functions. The main problem with this approach is that it is 22 | quite slow; Not when looking up the information but when collecting 23 | them. 24 | 25 | An instance of `rope.base.oi.objectinfo.ObjectInfoManager` can be used 26 | for accessing these information. It saves the data in a 27 | `rope.base.oi.objectdb.ObjectDB` internally. 28 | 29 | Now if our objectdb does not know anything about a function and we 30 | need the value returned by it, static object inference, SOI, comes 31 | into play. It analyzes function body and tries to infer the object 32 | that is returned from it (we usually need the returned value for the 33 | given parameter objects). 34 | 35 | Rope might collect and store information for other `PyName`\s, too. 36 | For instance rope stores the object builtin containers hold. 37 | 38 | """ 39 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/oi/type_hinting/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/lib/rope/base/oi/type_hinting/__init__.py -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/oi/type_hinting/interfaces.py: -------------------------------------------------------------------------------- 1 | class ITypeHintingFactory(object): 2 | 3 | def make_param_provider(self): 4 | """ 5 | :rtype: rope.base.oi.type_hinting.providers.interfaces.IParamProvider 6 | """ 7 | raise NotImplementedError 8 | 9 | def make_return_provider(self): 10 | """ 11 | :rtype: rope.base.oi.type_hinting.providers.interfaces.IReturnProvider 12 | """ 13 | raise NotImplementedError 14 | 15 | def make_assignment_provider(self): 16 | """ 17 | :rtype: rope.base.oi.type_hinting.providers.interfaces.IAssignmentProvider 18 | """ 19 | raise NotImplementedError 20 | 21 | def make_resolver(self): 22 | """ 23 | :rtype: rope.base.oi.type_hinting.resolvers.interfaces.IResolver 24 | """ 25 | raise NotImplementedError 26 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/oi/type_hinting/providers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/lib/rope/base/oi/type_hinting/providers/__init__.py -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/oi/type_hinting/providers/interfaces.py: -------------------------------------------------------------------------------- 1 | class IParamProvider(object): 2 | 3 | def __call__(self, pyfunc, param_name): 4 | """ 5 | :type pyfunc: rope.base.pyobjectsdef.PyFunction 6 | :type param_name: str 7 | :rtype: rope.base.pyobjects.PyDefinedObject | rope.base.pyobjects.PyObject or None 8 | """ 9 | raise NotImplementedError 10 | 11 | 12 | class IReturnProvider(object): 13 | """ 14 | :type resolve: rope.base.oi.type_hinting.resolvers.interfaces.IResolver 15 | """ 16 | resolve = None 17 | 18 | def __call__(self, pyfunc): 19 | """ 20 | :type pyfunc: rope.base.pyobjectsdef.PyFunction 21 | :rtype: rope.base.pyobjects.PyDefinedObject | rope.base.pyobjects.PyObject or None 22 | """ 23 | raise NotImplementedError 24 | 25 | 26 | class IAssignmentProvider(object): 27 | """ 28 | :type resolve: rope.base.oi.type_hinting.resolvers.interfaces.IResolver 29 | """ 30 | resolve = None 31 | 32 | def __call__(self, pyname): 33 | """ 34 | :type pyname: rope.base.pynamesdef.AssignedName 35 | :rtype: rope.base.pyobjects.PyDefinedObject | rope.base.pyobjects.PyObject or None 36 | """ 37 | raise NotImplementedError 38 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/oi/type_hinting/providers/numpydocstrings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Some code extracted (or based on code) from: 3 | https://github.com/davidhalter/jedi/blob/b489019f5bd5750051122b94cc767df47751ecb7/jedi/evaluate/docstrings.py 4 | Thanks to @davidhalter for this utils under MIT License. 5 | """ 6 | import re 7 | from ast import literal_eval 8 | from rope.base.oi.type_hinting.providers import docstrings 9 | 10 | try: 11 | from numpydoc.docscrape import NumpyDocString 12 | except ImportError: 13 | NumpyDocString = None 14 | 15 | 16 | class NumPyDocstringParamParser(docstrings.IParamParser): 17 | 18 | def __call__(self, docstring, param_name): 19 | """Search `docstring` (in numpydoc format) for type(-s) of `param_name`.""" 20 | params = NumpyDocString(docstring)._parsed_data['Parameters'] 21 | for p_name, p_type, p_descr in params: 22 | if p_name == param_name: 23 | m = re.match('([^,]+(,[^,]+)*?)(,[ ]*optional)?$', p_type) 24 | if m: 25 | p_type = m.group(1) 26 | 27 | if p_type.startswith('{'): 28 | types = set(type(x).__name__ for x in literal_eval(p_type)) 29 | return list(types) 30 | else: 31 | return [p_type] 32 | return [] 33 | 34 | 35 | class _DummyParamParser(docstrings.IParamParser): 36 | def __call__(self, docstring, param_name): 37 | return [] 38 | 39 | 40 | if not NumpyDocString: 41 | NumPyDocstringParamParser = _DummyParamParser 42 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/oi/type_hinting/providers/pep0484_type_comments.py: -------------------------------------------------------------------------------- 1 | import re 2 | from rope.base.oi.type_hinting import utils 3 | from rope.base.oi.type_hinting.providers import interfaces 4 | 5 | 6 | class AssignmentProvider(interfaces.IAssignmentProvider): 7 | 8 | def __init__(self, resolver): 9 | """ 10 | :type resolver: rope.base.oi.type_hinting.resolvers.interfaces.IResolver 11 | """ 12 | self._resolve = resolver 13 | 14 | PEP0484_TYPE_COMMENT_PATTERNS = ( 15 | re.compile(r'type:\s*([^\n]+)'), 16 | ) 17 | 18 | def __call__(self, pyname): 19 | """ 20 | :type pyname: rope.base.pynamesdef.AssignedName 21 | :rtype: rope.base.pyobjects.PyDefinedObject | rope.base.pyobjects.PyObject or None 22 | """ 23 | from rope.base.oi.soi import _get_lineno_for_node 24 | lineno = _get_lineno_for_node(pyname.assignments[0].ast_node) 25 | holding_scope = pyname.module.get_scope().get_inner_scope_for_line(lineno) 26 | line = holding_scope._get_global_scope()._scope_finder.lines.get_line(lineno) 27 | if '#' in line: 28 | type_strs = self._search_type_in_type_comment(line.split('#', 1)[1]) 29 | if type_strs: 30 | return self._resolve(type_strs[0], holding_scope.pyobject) 31 | 32 | def _search_type_in_type_comment(self, code): 33 | """ For more info see: 34 | https://www.python.org/dev/peps/pep-0484/#type-comments 35 | 36 | >>> AssignmentProvider()._search_type_in_type_comment('type: int') 37 | ['int'] 38 | """ 39 | for p in self.PEP0484_TYPE_COMMENT_PATTERNS: 40 | match = p.search(code) 41 | if match: 42 | return [match.group(1)] 43 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/oi/type_hinting/resolvers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/lib/rope/base/oi/type_hinting/resolvers/__init__.py -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/oi/type_hinting/resolvers/composite.py: -------------------------------------------------------------------------------- 1 | from rope.base.oi.type_hinting.resolvers import interfaces 2 | 3 | 4 | class Resolver(interfaces.IResolver): 5 | 6 | def __init__(self, *delegates): 7 | """ 8 | :type delegates: list[rope.base.oi.type_hinting.resolvers.interfaces.IResolver] 9 | """ 10 | self._delegates = delegates 11 | 12 | def __call__(self, hint, pyobject): 13 | """ 14 | :param hint: For example "List[int]" or "(Foo, Bar) -> Baz" or simple "Foo" 15 | :type hint: str 16 | :type pyobject: rope.base.pyobjects.PyDefinedObject | rope.base.pyobjects.PyObject 17 | :rtype: rope.base.pyobjects.PyDefinedObject | rope.base.pyobjects.PyObject or None 18 | """ 19 | for delegate in self._delegates: 20 | result = delegate(hint, pyobject) 21 | if result: 22 | return result 23 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/oi/type_hinting/resolvers/interfaces.py: -------------------------------------------------------------------------------- 1 | class IResolver(object): 2 | 3 | def __call__(self, hint, pyobject): 4 | """ 5 | :param hint: For example "List[int]" or "(Foo, Bar) -> Baz" or simple "Foo" 6 | :type hint: str 7 | :type pyobject: rope.base.pyobjects.PyDefinedObject | rope.base.pyobjects.PyObject 8 | :rtype: rope.base.pyobjects.PyDefinedObject | rope.base.pyobjects.PyObject or None 9 | """ 10 | raise NotImplementedError 11 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/oi/type_hinting/resolvers/types.py: -------------------------------------------------------------------------------- 1 | from rope.base.oi.type_hinting import evaluate 2 | from rope.base.oi.type_hinting.resolvers import interfaces 3 | 4 | 5 | class Resolver(interfaces.IResolver): 6 | def __call__(self, hint, pyobject): 7 | """ 8 | :param hint: For example "List[int]" or "(Foo, Bar) -> Baz" or simple "Foo" 9 | :type hint: str 10 | :type pyobject: rope.base.pyobjects.PyDefinedObject | rope.base.pyobjects.PyObject 11 | :rtype: rope.base.pyobjects.PyDefinedObject | rope.base.pyobjects.PyObject or None 12 | """ 13 | try: 14 | return evaluate.evaluate(hint, pyobject) 15 | except (Exception): 16 | pass 17 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/prefs.py: -------------------------------------------------------------------------------- 1 | class Prefs(object): 2 | 3 | def __init__(self): 4 | self.prefs = {} 5 | self.callbacks = {} 6 | 7 | def set(self, key, value): 8 | """Set the value of `key` preference to `value`.""" 9 | if key in self.callbacks: 10 | self.callbacks[key](value) 11 | else: 12 | self.prefs[key] = value 13 | 14 | def add(self, key, value): 15 | """Add an entry to a list preference 16 | 17 | Add `value` to the list of entries for the `key` preference. 18 | 19 | """ 20 | if not key in self.prefs: 21 | self.prefs[key] = [] 22 | self.prefs[key].append(value) 23 | 24 | def get(self, key, default=None): 25 | """Get the value of the key preference""" 26 | return self.prefs.get(key, default) 27 | 28 | def add_callback(self, key, callback): 29 | """Add `key` preference with `callback` function 30 | 31 | Whenever `key` is set the callback is called with the 32 | given `value` as parameter. 33 | 34 | """ 35 | self.callbacks[key] = callback 36 | 37 | def __setitem__(self, key, value): 38 | self.set(key, value) 39 | 40 | def __getitem__(self, key): 41 | return self.get(key) 42 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/pynamesdef.py: -------------------------------------------------------------------------------- 1 | import rope.base.oi.soi 2 | from rope.base import pynames 3 | from rope.base.pynames import * 4 | 5 | 6 | class AssignedName(pynames.AssignedName): 7 | 8 | def __init__(self, lineno=None, module=None, pyobject=None): 9 | self.lineno = lineno 10 | self.module = module 11 | self.assignments = [] 12 | self.pyobject = _Inferred(self._get_inferred, 13 | pynames._get_concluded_data(module)) 14 | self.pyobject.set(pyobject) 15 | 16 | @utils.prevent_recursion(lambda: None) 17 | def _get_inferred(self): 18 | if self.module is not None: 19 | return rope.base.oi.soi.infer_assigned_object(self) 20 | 21 | def get_object(self): 22 | return self.pyobject.get() 23 | 24 | def get_definition_location(self): 25 | """Returns a (module, lineno) tuple""" 26 | if self.lineno is None and self.assignments: 27 | self.lineno = self.assignments[0].get_lineno() 28 | return (self.module, self.lineno) 29 | 30 | def invalidate(self): 31 | """Forget the `PyObject` this `PyName` holds""" 32 | self.pyobject.set(None) 33 | 34 | 35 | class ParameterName(pynames.ParameterName): 36 | 37 | def __init__(self, pyfunction, index): 38 | self.pyfunction = pyfunction 39 | self.index = index 40 | 41 | def get_object(self): 42 | result = self.pyfunction.get_parameter(self.index) 43 | if result is None: 44 | result = rope.base.pyobjects.get_unknown() 45 | return result 46 | 47 | def get_objects(self): 48 | """Returns the list of objects passed as this parameter""" 49 | return rope.base.oi.soi.get_passed_objects( 50 | self.pyfunction, self.index) 51 | 52 | def get_definition_location(self): 53 | return (self.pyfunction.get_module(), self.pyfunction.get_ast().lineno) 54 | 55 | _Inferred = pynames._Inferred 56 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/simplify.py: -------------------------------------------------------------------------------- 1 | """A module to ease code analysis 2 | 3 | This module is here to help source code analysis. 4 | """ 5 | import re 6 | 7 | from rope.base import codeanalyze, utils 8 | 9 | 10 | @utils.cached(7) 11 | def real_code(source): 12 | """Simplify `source` for analysis 13 | 14 | It replaces: 15 | 16 | * comments with spaces 17 | * strs with a new str filled with spaces 18 | * implicit and explicit continuations with spaces 19 | * tabs and semicolons with spaces 20 | 21 | The resulting code is a lot easier to analyze if we are interested 22 | only in offsets. 23 | """ 24 | collector = codeanalyze.ChangeCollector(source) 25 | for start, end in ignored_regions(source): 26 | if source[start] == '#': 27 | replacement = ' ' * (end - start) 28 | else: 29 | replacement = '"%s"' % (' ' * (end - start - 2)) 30 | collector.add_change(start, end, replacement) 31 | source = collector.get_changed() or source 32 | collector = codeanalyze.ChangeCollector(source) 33 | parens = 0 34 | for match in _parens.finditer(source): 35 | i = match.start() 36 | c = match.group() 37 | if c in '({[': 38 | parens += 1 39 | if c in ')}]': 40 | parens -= 1 41 | if c == '\n' and parens > 0: 42 | collector.add_change(i, i + 1, ' ') 43 | source = collector.get_changed() or source 44 | return source.replace('\\\n', ' ').replace('\t', ' ').replace(';', '\n') 45 | 46 | 47 | @utils.cached(7) 48 | def ignored_regions(source): 49 | """Return ignored regions like strings and comments in `source` """ 50 | return [(match.start(), match.end()) for match in _str.finditer(source)] 51 | 52 | 53 | _str = re.compile('%s|%s' % (codeanalyze.get_comment_pattern(), 54 | codeanalyze.get_string_pattern())) 55 | _parens = re.compile(r'[\({\[\]}\)\n]') 56 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/base/utils/pycompat.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import _ast 3 | # from rope.base import ast 4 | 5 | PY2 = sys.version_info[0] == 2 6 | PY27 = sys.version_info[0:2] >= (2, 7) 7 | PY3 = sys.version_info[0] == 3 8 | PY34 = sys.version_info[0:2] >= (3, 4) 9 | 10 | try: 11 | str = unicode 12 | except NameError: # PY3 13 | 14 | str = str 15 | string_types = (str,) 16 | import builtins 17 | ast_arg_type = _ast.arg 18 | 19 | def execfile(fn, global_vars=None, local_vars=None): 20 | with open(fn) as f: 21 | code = compile(f.read(), fn, 'exec') 22 | exec(code, global_vars or {}, local_vars) 23 | 24 | def get_ast_arg_arg(node): 25 | if isinstance(node, string_types): # TODO: G21: Understand the Algorithm (Where it's used?) 26 | return node 27 | return node.arg 28 | 29 | def get_ast_with_items(node): 30 | return node.items 31 | 32 | else: # PY2 33 | 34 | string_types = (basestring,) 35 | builtins = __import__('__builtin__') 36 | ast_arg_type = _ast.Name 37 | execfile = execfile 38 | 39 | def get_ast_arg_arg(node): 40 | if isinstance(node, string_types): # Python2 arguments.vararg, arguments.kwarg 41 | return node 42 | return node.id 43 | 44 | def get_ast_with_items(node): 45 | return [node] 46 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | """rope IDE tools package 2 | 3 | This package contains modules that can be used in IDEs 4 | but do not depend on the UI. So these modules will be used 5 | by `rope.ui` modules. 6 | 7 | """ 8 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/contrib/changestack.py: -------------------------------------------------------------------------------- 1 | """For performing many refactorings as a single command 2 | 3 | `changestack` module can be used to perform many refactorings on top 4 | of each other as one bigger command. It can be used like:: 5 | 6 | stack = ChangeStack(project, 'my big command') 7 | 8 | #.. 9 | stack.push(refactoring1.get_changes()) 10 | #.. 11 | stack.push(refactoring2.get_changes()) 12 | #.. 13 | stack.push(refactoringX.get_changes()) 14 | 15 | stack.pop_all() 16 | changes = stack.merged() 17 | 18 | Now `changes` can be previewed or performed as before. 19 | """ 20 | 21 | from rope.base import change 22 | 23 | 24 | class ChangeStack(object): 25 | 26 | def __init__(self, project, description='merged changes'): 27 | self.project = project 28 | self.description = description 29 | self.stack = [] 30 | 31 | def push(self, changes): 32 | self.stack.append(changes) 33 | self.project.do(changes) 34 | 35 | def pop_all(self): 36 | for i in range(len(self.stack)): 37 | self.project.history.undo(drop=True) 38 | 39 | def merged(self): 40 | result = change.ChangeSet(self.description) 41 | for changes in self.stack: 42 | for c in self._basic_changes(changes): 43 | result.add_change(c) 44 | return result 45 | 46 | def _basic_changes(self, changes): 47 | if isinstance(changes, change.ChangeSet): 48 | for child in changes.changes: 49 | for atom in self._basic_changes(child): 50 | yield atom 51 | else: 52 | yield changes 53 | -------------------------------------------------------------------------------- /blackmamba/lib/rope/refactor/topackage.py: -------------------------------------------------------------------------------- 1 | import rope.refactor.importutils 2 | from rope.base.change import ChangeSet, ChangeContents, MoveResource, \ 3 | CreateFolder 4 | 5 | 6 | class ModuleToPackage(object): 7 | 8 | def __init__(self, project, resource): 9 | self.project = project 10 | self.resource = resource 11 | 12 | def get_changes(self): 13 | changes = ChangeSet('Transform <%s> module to package' % 14 | self.resource.path) 15 | new_content = self._transform_relatives_to_absolute(self.resource) 16 | if new_content is not None: 17 | changes.add_change(ChangeContents(self.resource, new_content)) 18 | parent = self.resource.parent 19 | name = self.resource.name[:-3] 20 | changes.add_change(CreateFolder(parent, name)) 21 | parent_path = parent.path + '/' 22 | if not parent.path: 23 | parent_path = '' 24 | new_path = parent_path + '%s/__init__.py' % name 25 | if self.resource.project == self.project: 26 | changes.add_change(MoveResource(self.resource, new_path)) 27 | return changes 28 | 29 | def _transform_relatives_to_absolute(self, resource): 30 | pymodule = self.project.get_pymodule(resource) 31 | import_tools = rope.refactor.importutils.ImportTools(self.project) 32 | return import_tools.relatives_to_absolutes(pymodule) 33 | -------------------------------------------------------------------------------- /blackmamba/lib/setuptools.py: -------------------------------------------------------------------------------- 1 | # It's just here as dummy module for flake8, which 2 | # does print setuptools version number in debug.py 3 | __version__ = '0.0.1-blackmamba' 4 | -------------------------------------------------------------------------------- /blackmamba/script/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/script/__init__.py -------------------------------------------------------------------------------- /blackmamba/script/clear_annotations.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | import editor 4 | 5 | 6 | def main(): 7 | editor.clear_annotations() 8 | 9 | 10 | if __name__ == '__main__': 11 | main() 12 | -------------------------------------------------------------------------------- /blackmamba/script/close_all_tabs_except_current_one.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | import blackmamba.ide.tab as tab 4 | 5 | 6 | def main(): 7 | tab.close_tabs_except_current() 8 | 9 | 10 | if __name__ == '__main__': 11 | main() 12 | -------------------------------------------------------------------------------- /blackmamba/script/jump_to_line.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | import blackmamba.ide.source as source 4 | import console 5 | 6 | 7 | def main(): 8 | try: 9 | input = console.input_alert('Jump to line...', 'Empty (or invalid) value to dismiss.') 10 | source.scroll_to_line(int(input)) 11 | except ValueError: 12 | # Invalid input value (not int) 13 | pass 14 | except KeyboardInterrupt: 15 | # Cancel button 16 | pass 17 | 18 | 19 | if __name__ == '__main__': 20 | main() 21 | -------------------------------------------------------------------------------- /blackmamba/script/new_file.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | import blackmamba.ide.tab as tab 4 | import editor 5 | import os 6 | import console 7 | 8 | 9 | def main(): 10 | path = editor.get_path() 11 | 12 | if not path: 13 | tab.new_file() 14 | return 15 | 16 | folder = os.path.dirname(path) 17 | try: 18 | file_name = console.input_alert('Enter filename').strip() 19 | 20 | if not file_name: 21 | raise KeyboardInterrupt 22 | 23 | path = os.path.join(folder, file_name) 24 | if os.path.exists(path): 25 | editor.open_file(path, new_tab=True) 26 | else: 27 | editor.make_new_file(path, new_tab=True) 28 | 29 | except KeyboardInterrupt: 30 | pass 31 | 32 | 33 | if __name__ == '__main__': 34 | main() 35 | -------------------------------------------------------------------------------- /blackmamba/script/refactoring/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/script/refactoring/__init__.py -------------------------------------------------------------------------------- /blackmamba/script/refactoring/futurize.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | import console 4 | import os 5 | import unittest.mock as mock 6 | 7 | import blackmamba.ide.source as source 8 | import blackmamba.ide.tab as tab 9 | import editor 10 | 11 | 12 | _SUFFIX = '3' 13 | 14 | 15 | def _replace_file_content(path): 16 | futurized_path = '{}{}'.format(path, _SUFFIX) 17 | 18 | if not os.path.exists(futurized_path): 19 | # This function is not called unless result is 0, thus if file doesn't 20 | # exist, we can assume that there's no need to change anything -> success 21 | return True 22 | 23 | line_number = source.get_line_number() 24 | content = editor.get_text() 25 | 26 | if not line_number or content is None: 27 | os.remove(futurized_path) 28 | return False 29 | 30 | new_content = open(futurized_path, 'r').read() 31 | editor.replace_text(0, len(content) - 1, new_content) 32 | source.scroll_to_line(line_number) 33 | os.remove(futurized_path) 34 | return True 35 | 36 | 37 | # I'm lazy one, cripples Pythonista logging 38 | @mock.patch('logging.basicConfig') 39 | def main(mock): 40 | import libfuturize.main 41 | 42 | path = editor.get_path() 43 | if not path or not path.endswith('.py'): 44 | console.hud_alert('Not a Python file', 'error') 45 | return 46 | 47 | tab.save() 48 | args = ['-1', '-n', '-w', '--all-imports', '--add-suffix', _SUFFIX, path] 49 | 50 | result = libfuturize.main.main(args) 51 | if result == 0 and _replace_file_content(path): 52 | console.hud_alert('Futurized') 53 | else: 54 | console.hud_alert('Failed to futurize', 'error') 55 | 56 | 57 | if __name__ == '__main__': 58 | from blackmamba.bundle import bundle 59 | with bundle('refactoring'): 60 | main() 61 | -------------------------------------------------------------------------------- /blackmamba/script/search_dash.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | import editor 4 | import urllib.parse 5 | import webbrowser 6 | import re 7 | 8 | _ALLOWED_CHAR = re.compile('[a-zA-Z0-9_]') 9 | 10 | 11 | def _encode_query(query): 12 | return urllib.parse.quote_plus(query, safe='', encoding=None, errors=None) 13 | 14 | 15 | def _dash_url(query): 16 | return 'dash://' + _encode_query(query) 17 | 18 | 19 | def _allowed_char(ch): 20 | return _ALLOWED_CHAR.match(ch) is not None 21 | 22 | 23 | def _query(): 24 | text = editor.get_text() 25 | 26 | if not text: 27 | return None 28 | 29 | selection = editor.get_selection() 30 | 31 | # Begin/end differs, query for selection 32 | if not selection[0] == selection[1]: 33 | return text[selection[0]:selection[1]] 34 | 35 | # Try to select current keyword around current cursor position 36 | bi = selection[0] 37 | while bi > 0 and _allowed_char(text[bi - 1:bi]): 38 | bi -= 1 39 | 40 | ei = selection[1] 41 | while ei < len(text) and _allowed_char(text[ei:ei + 1]): 42 | ei += 1 43 | 44 | return text[bi:ei] 45 | 46 | 47 | def main(query=None): 48 | """Opens Dash documentation browser. 49 | 50 | If you do not provide query, current selection will be used. If there's 51 | nothing selected in the editor, cursor position is used to find identifier. 52 | 53 | Nothing happens if query is not provided and identifier can't be found. 54 | 55 | Args: 56 | query: Text to search in Dash 57 | """ 58 | 59 | q = query or _query() 60 | 61 | if not q: 62 | return 63 | 64 | webbrowser.open(_dash_url(q)) 65 | 66 | 67 | if __name__ == '__main__': 68 | main() 69 | -------------------------------------------------------------------------------- /blackmamba/script/selfupdate.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | import requests 4 | import traceback 5 | from blackmamba.log import error 6 | 7 | 8 | try: 9 | exec(requests.get('http://bit.ly/get-blackmamba').text) 10 | 11 | except Exception: 12 | error('Failed to fetch & execute installer') 13 | error(traceback.format_exc()) 14 | -------------------------------------------------------------------------------- /blackmamba/uikit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/uikit/__init__.py -------------------------------------------------------------------------------- /blackmamba/uikit/table.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | from enum import Enum 4 | 5 | 6 | class UITableViewCellStyle(str, Enum): 7 | default = 'default' 8 | subtitle = 'subtitle' 9 | value1 = 'value1' 10 | value2 = 'value2' 11 | -------------------------------------------------------------------------------- /blackmamba/util/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/blackmamba/util/__init__.py -------------------------------------------------------------------------------- /blackmamba/util/path.py: -------------------------------------------------------------------------------- 1 | #!python3 2 | 3 | import os 4 | 5 | _DOCUMENTS = os.path.expanduser('~/Documents') 6 | 7 | 8 | def strip_documents_folder(path): 9 | """ 10 | Strip ~/Documents part of the path. 11 | 12 | ~/Documents/hallo.py -> hallo.py 13 | ~/Documents/folder/a.py -> folder/a.py 14 | """ 15 | if path.startswith(_DOCUMENTS): 16 | return path[len(_DOCUMENTS) + 1:] 17 | return path 18 | 19 | 20 | def is_python_file(path): 21 | _, ext = os.path.splitext(path) 22 | return ext.lower() == '.py' 23 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SPHINXPROJ = BlackMamba 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -------------------------------------------------------------------------------- /docs/autobuild.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ -d build ]; then 4 | rm -rf build 5 | fi 6 | sphinx-autobuild -b html --open-browser --delay 1 source build/html 7 | -------------------------------------------------------------------------------- /docs/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ -d build ]; then 4 | rm -rf build 5 | fi 6 | make html 7 | -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | sphinx==1.5.6 2 | recommonmark 3 | sphinx_rtd_theme 4 | -------------------------------------------------------------------------------- /docs/source/_static/images/analyzer.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/docs/source/_static/images/analyzer.jpeg -------------------------------------------------------------------------------- /docs/source/_static/images/docstrings.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/docs/source/_static/images/docstrings.jpeg -------------------------------------------------------------------------------- /docs/source/_static/images/drag_and_drop.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/docs/source/_static/images/drag_and_drop.jpeg -------------------------------------------------------------------------------- /docs/source/_static/images/find_usages.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/docs/source/_static/images/find_usages.jpeg -------------------------------------------------------------------------------- /docs/source/_static/images/open_quickly.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/docs/source/_static/images/open_quickly.jpeg -------------------------------------------------------------------------------- /docs/source/_static/images/refactoring_preview.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/docs/source/_static/images/refactoring_preview.jpeg -------------------------------------------------------------------------------- /docs/source/_static/images/refactoring_rename.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/docs/source/_static/images/refactoring_rename.jpeg -------------------------------------------------------------------------------- /docs/source/_static/images/run_quickly.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/docs/source/_static/images/run_quickly.jpeg -------------------------------------------------------------------------------- /docs/source/_static/images/shortcuts.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/docs/source/_static/images/shortcuts.jpeg -------------------------------------------------------------------------------- /docs/source/_static/images/unit_tests.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/docs/source/_static/images/unit_tests.jpeg -------------------------------------------------------------------------------- /docs/source/_static/styles.css: -------------------------------------------------------------------------------- 1 | .wy-nav-content { 2 | max-width: none; 3 | } 4 | -------------------------------------------------------------------------------- /docs/source/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | {% block extrahead %} 3 | 4 | {% endblock %} 5 | -------------------------------------------------------------------------------- /docs/source/acknowledgments/docutils.md: -------------------------------------------------------------------------------- 1 | # docutils 2 | 3 | [Project homepage](https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/). 4 | 5 | **License** 6 | 7 | See [COPYING](https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/COPYING.txt) for more details. 8 | -------------------------------------------------------------------------------- /docs/source/acknowledgments/flake8.md: -------------------------------------------------------------------------------- 1 | # flake8 2 | 3 | [Project homepage](https://gitlab.com/pycqa/flake8). 4 | 5 | **License** 6 | 7 | ```text 8 | Copyright (C) 2011-2013 Tarek Ziade 9 | Copyright (C) 2012-2016 Ian Cordasco 10 | 11 | Permission is hereby granted, free of charge, to any person obtaining a copy of 12 | this software and associated documentation files (the "Software"), to deal in 13 | the Software without restriction, including without limitation the rights to 14 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 15 | of the Software, and to permit persons to whom the Software is furnished to do 16 | so, subject to the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be included in all 19 | copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 27 | SOFTWARE. 28 | ``` 29 | -------------------------------------------------------------------------------- /docs/source/acknowledgments/future.md: -------------------------------------------------------------------------------- 1 | # future 2 | 3 | 4 | [Project homepage](https://github.com/PythonCharmers/python-future). 5 | 6 | **License** 7 | 8 | ```text 9 | Copyright (c) 2013-2016 Python Charmers Pty Ltd, Australia 10 | 11 | Permission is hereby granted, free of charge, to any person obtaining a copy 12 | of this software and associated documentation files (the "Software"), to deal 13 | in the Software without restriction, including without limitation the rights 14 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | copies of the Software, and to permit persons to whom the Software is 16 | furnished to do so, subject to the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be included in 19 | all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | THE SOFTWARE. 28 | ``` 29 | -------------------------------------------------------------------------------- /docs/source/acknowledgments/index.md: -------------------------------------------------------------------------------- 1 | # Acknowledgments 2 | 3 | Black Mamba has several bundled packages. Why? 4 | 5 | * Not fully working `pip` in Pythonista. 6 | * Pythonista contains some of these packages, but they're outdated (longer release cycle). 7 | * Installation must be as easy as possible (no `pip`, `pip3`, no dependencies). 8 | 9 | List of bundled packages: 10 | 11 | ```eval_rst 12 | .. toctree:: 13 | :maxdepth: 1 14 | 15 | docutils 16 | flake8 17 | future 18 | mccabe 19 | pycodestyle 20 | pyflakes 21 | rope 22 | ``` 23 | -------------------------------------------------------------------------------- /docs/source/acknowledgments/mccabe.md: -------------------------------------------------------------------------------- 1 | # mccabe 2 | 3 | 4 | [Project homepage](https://github.com/pycqa/mccabe). 5 | 6 | **License** 7 | 8 | ```text 9 | Copyright © Ned Batchelder 10 | Copyright © 2011-2013 Tarek Ziade 11 | Copyright © 2013 Florent Xicluna 12 | 13 | Licensed under the terms of the Expat License 14 | 15 | Permission is hereby granted, free of charge, to any person 16 | obtaining a copy of this software and associated documentation files 17 | (the "Software"), to deal in the Software without restriction, 18 | including without limitation the rights to use, copy, modify, merge, 19 | publish, distribute, sublicense, and/or sell copies of the Software, 20 | and to permit persons to whom the Software is furnished to do so, 21 | subject to the following conditions: 22 | 23 | The above copyright notice and this permission notice shall be 24 | included in all copies or substantial portions of the Software. 25 | 26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 27 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 28 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 29 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 30 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 31 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 32 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 33 | SOFTWARE. 34 | ``` 35 | -------------------------------------------------------------------------------- /docs/source/acknowledgments/pycodestyle.md: -------------------------------------------------------------------------------- 1 | # pycodestyle 2 | 3 | 4 | [Project homepage](https://github.com/pycqa/pycodestyle). 5 | 6 | 7 | **License** 8 | 9 | ```text 10 | Copyright © 2006-2009 Johann C. Rocholl 11 | Copyright © 2009-2014 Florent Xicluna 12 | Copyright © 2014-2016 Ian Lee 13 | 14 | Licensed under the terms of the Expat License 15 | 16 | Permission is hereby granted, free of charge, to any person 17 | obtaining a copy of this software and associated documentation files 18 | (the "Software"), to deal in the Software without restriction, 19 | including without limitation the rights to use, copy, modify, merge, 20 | publish, distribute, sublicense, and/or sell copies of the Software, 21 | and to permit persons to whom the Software is furnished to do so, 22 | subject to the following conditions: 23 | 24 | The above copyright notice and this permission notice shall be 25 | included in all copies or substantial portions of the Software. 26 | 27 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 28 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 29 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 30 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 31 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 32 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 33 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 34 | SOFTWARE. 35 | ``` 36 | -------------------------------------------------------------------------------- /docs/source/acknowledgments/pyflakes.md: -------------------------------------------------------------------------------- 1 | # pyflakes 2 | 3 | [Project homepage](https://github.com/PyCQA/pyflakes). 4 | 5 | **License** 6 | 7 | ```text 8 | Copyright 2005-2011 Divmod, Inc. 9 | Copyright 2013-2014 Florent Xicluna 10 | 11 | Permission is hereby granted, free of charge, to any person obtaining 12 | a copy of this software and associated documentation files (the 13 | "Software"), to deal in the Software without restriction, including 14 | without limitation the rights to use, copy, modify, merge, publish, 15 | distribute, sublicense, and/or sell copies of the Software, and to 16 | permit persons to whom the Software is furnished to do so, subject to 17 | the following conditions: 18 | 19 | The above copyright notice and this permission notice shall be 20 | included in all copies or substantial portions of the Software. 21 | 22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 26 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 27 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 28 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | ``` 30 | -------------------------------------------------------------------------------- /docs/source/acknowledgments/rope.md: -------------------------------------------------------------------------------- 1 | # rope 2 | 3 | [Project homepage](https://github.com/python-rope/rope>). 4 | 5 | **License** 6 | 7 | ```text 8 | Copyright (C) 2015-2016 Nicholas Smith 9 | Copyright (C) 2014-2015 Matej Cepl 10 | Copyright (C) 2006-2012 Ali Gholami Rudi 11 | Copyright (C) 2009-2012 Anton Gritsay 12 | 13 | This program is free software; you can redistribute it and/or modify it 14 | under the terms of GNU General Public License as published by the 15 | Free Software Foundation; either version 2 of the license, or (at your 16 | opinion) any later version. 17 | 18 | This program is distributed in the hope that it will be useful, 19 | but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | GNU General Public License for more details. 22 | ``` 23 | -------------------------------------------------------------------------------- /docs/source/api/blackmamba.framework.security.md: -------------------------------------------------------------------------------- 1 | # blackmamba.framework.security 2 | 3 | ```eval_rst 4 | .. automodule:: blackmamba.framework.security 5 | :members: 6 | ``` 7 | -------------------------------------------------------------------------------- /docs/source/api/blackmamba.log.md: -------------------------------------------------------------------------------- 1 | # blackmamba.log 2 | 3 | ```eval_rst 4 | .. automodule:: blackmamba.log 5 | :members: 6 | :member-order: bysource 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/source/api/blackmamba.md: -------------------------------------------------------------------------------- 1 | # blackmamba 2 | 3 | ```eval_rst 4 | .. automodule:: blackmamba 5 | :members: 6 | :member-order: bysource 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/source/api/blackmamba.system.md: -------------------------------------------------------------------------------- 1 | # blackmamba.system 2 | 3 | ```eval_rst 4 | .. automodule:: blackmamba.system 5 | :members: 6 | :member-order: bysource 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/source/api/blackmamba.uikit.keyboard.md: -------------------------------------------------------------------------------- 1 | # blackmamba.uikit.keyboard 2 | 3 | ```eval_rst 4 | .. automodule:: blackmamba.uikit.keyboard 5 | :members: 6 | :member-order: bysource 7 | :exclude-members: UIEventType, UIEventSubtype, KeyEventHandler 8 | ``` 9 | -------------------------------------------------------------------------------- /docs/source/api/index.md: -------------------------------------------------------------------------------- 1 | # API Reference 2 | 3 | ```eval_rst 4 | :Release: |version| 5 | :Date: |today| 6 | 7 | .. note:: Module is Python 3 compatible only. 8 | 9 | .. toctree:: 10 | :maxdepth: 1 11 | 12 | blackmamba 13 | blackmamba.log 14 | blackmamba.system 15 | blackmamba.uikit.keyboard 16 | blackmamba.framework.security 17 | ``` 18 | -------------------------------------------------------------------------------- /docs/source/contribution.md: -------------------------------------------------------------------------------- 1 | # Contribution 2 | 3 | There are several areas where you can help. 4 | 5 | ## Documentation 6 | 7 | I'm not native English speaker and some of my sentences sound weird. 8 | Fork [blackmamba](https://github.com/zrzka/blackmamba) repository, 9 | update [documentation](https://github.com/zrzka/blackmamba/tree/master/docs/source) and 10 | open pull request. Will happily merge it. 11 | 12 | ## Testing 13 | 14 | If you find a bug, please do not hesitate to [file an issue](https://github.com/zrzka/blackmamba/issues). 15 | I'm unable to test everything. 16 | 17 | ## Questions 18 | 19 | Do you have a question? [File an issue](https://github.com/zrzka/blackmamba/issues), I'll add 20 | `question` tag and will answer it. Or you can send me direct message on 21 | [Twitter](https://twitter.com/robertvojta). 22 | 23 | ## New ideas 24 | 25 | I'm open to new ideas as well. Please, [file an issue](https://github.com/zrzka/blackmamba/issues). 26 | 27 | 28 | ## Development 29 | 30 | ### Style 31 | 32 | Look around and try to keep same style. There're no hard rules. Just one and it's about 33 | documentation strings. [Google Style](http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) 34 | is used with minimum amount of reStructuredText features. That's because the documentation 35 | string must be readable even in the console as a plain string. 36 | 37 | 38 | ### Pull requests 39 | 40 | Pull requests must pass `flake8` checks: 41 | 42 | ``` 43 | flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics 44 | flake8 . --count --max-complexity=10 --max-line-length=127 --statistics 45 | ``` 46 | 47 | Pull requests must pass tests: 48 | 49 | ``` 50 | PYTHONPATH=. pytest tests 51 | ``` 52 | 53 | Consult [.travis.yml](https://github.com/zrzka/blackmamba/blob/master/.travis.yml) for more details. 54 | -------------------------------------------------------------------------------- /docs/source/faq.md: -------------------------------------------------------------------------------- 1 | # FAQ 2 | 3 | ## General 4 | 5 | ### Are you affiliated with Pythonista? 6 | 7 | No. It's a completely separate project. Although I discuss some of my ideas 8 | with [Ole](https://twitter.com/olemoritz) (Pythonista author) from time to time. 9 | 10 | 11 | ### What if some feature will be added to Pythonista? 12 | 13 | I'm perfectly okay with this and will be happy if something from Black Mamba 14 | will be natively supported by the Pythonista. That's also the reason why I filled 15 | [so many issues](https://github.com/omz/Pythonista-Issues/issues/created_by/zrzka). 16 | 17 | These features will be removed from Black Mamba after some period if this happens. 18 | -------------------------------------------------------------------------------- /docs/source/gallery.md: -------------------------------------------------------------------------------- 1 | # Gallery 2 | 3 | Some screenshots to better understand what is the Black Mamba about. 4 | 5 | ## iOS 11 Drag & Drop support 6 | 7 | ![](_static/images/drag_and_drop.jpeg) 8 | 9 | 10 | ## Open quickly 11 | 12 | ![](_static/images/open_quickly.jpeg) 13 | 14 | 15 | ## Find usages 16 | 17 | ![](_static/images/find_usages.jpeg) 18 | 19 | 20 | ## Inline unit test results 21 | 22 | ![](_static/images/unit_tests.jpeg) 23 | 24 | 25 | ## Inline documentation 26 | 27 | ![](_static/images/docstrings.jpeg) 28 | 29 | 30 | ## Inline analyzer results 31 | 32 | ![](_static/images/analyzer.jpeg) 33 | 34 | 35 | ## Run quickly 36 | 37 | ![](_static/images/run_quickly.jpeg) 38 | 39 | 40 | ## Others 41 | 42 | ![](_static/images/shortcuts.jpeg) 43 | 44 | 45 | ## Refactoring 46 | 47 | ![](_static/images/refactoring_rename.jpeg) 48 | 49 | ![](_static/images/refactoring_preview.jpeg) 50 | -------------------------------------------------------------------------------- /docs/source/index.md: -------------------------------------------------------------------------------- 1 | # Documentation 2 | 3 | Welcome stranger. Use one of the following links to continue. 4 | 5 | ```eval_rst 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | about 10 | user/index 11 | api/index 12 | contribution 13 | faq 14 | gallery 15 | acknowledgments/index 16 | ``` 17 | -------------------------------------------------------------------------------- /docs/source/user/index.md: -------------------------------------------------------------------------------- 1 | # User Guide 2 | 3 | ```eval_rst 4 | :Release: |version| 5 | :Date: |today| 6 | 7 | .. note:: Module is Python 3 compatible only. 8 | ``` 9 | 10 | This guide is intended as an introductory overview of Black Mamba and 11 | explains how to install and make use of the most important features of 12 | Black Mamba. For detailed reference documentation of the functions and 13 | classes contained in the package, see the [API Reference](../api/index.md). 14 | 15 | ```eval_rst 16 | .. toctree:: 17 | :maxdepth: 1 18 | 19 | requirements 20 | install 21 | configuration 22 | shortcuts 23 | scripts 24 | ``` 25 | -------------------------------------------------------------------------------- /docs/source/user/install.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | 4 | ## Install 5 | 6 | ```python 7 | import requests as r; exec(r.get('http://bit.ly/get-blackmamba').text) 8 | ``` 9 | 10 | Copy the above line, paste it into Pythonista interactive prompt and execute it. 11 | Black Mamba will be installed under the `site-packages-3` folder. 12 | 13 | 14 | ## Update 15 | 16 | Black Mamba checks for updates automatically. You can disable check for 17 | updates entirely or you can configure time interval. 18 | See [Configuration](configuration.md) section. 19 | 20 | Updates are **not** installed automatically. Black Mamba just informs you 21 | about available update. Copy & paste the installation line into Pythonista 22 | interactive prompt and execute it. Latest version will be downloaded and 23 | installed. 24 | 25 | 26 | ## PIP 27 | 28 | Black Mamba no longer supports installation via `pip`. Latest available 29 | release is 1.0.2. 30 | 31 | 32 | ## Startup 33 | 34 | Black Mamba requires you to put following lines to the 35 | `Python Modules/site-packages-3/pythonista_startup.py` file: 36 | 37 | ```python 38 | #!python3 39 | import blackmamba 40 | 41 | blackmamba.main() 42 | ``` 43 | 44 | Note: Python Modules folder can be found in the sidebar after app startup. 45 | -------------------------------------------------------------------------------- /docs/source/user/requirements.md: -------------------------------------------------------------------------------- 1 | # Requirements 2 | 3 | ## System 4 | 5 | * iOS >= 10 6 | * iPad w/ external keyboard 7 | 8 | External keyboard "is a must". You can use [Scripts](scripts.md) as action items (wrench menu icon), 9 | but it's not as great as with [Shortcuts](shortcuts.md). 10 | 11 | > Black Mamba should work on iPhone, but the UI is not optimized 12 | > for this device at all. You can try it, but it's not officially supported 13 | > and never will be. 14 | -------------------------------------------------------------------------------- /readthedocs.yml: -------------------------------------------------------------------------------- 1 | python: 2 | version: 3.5 3 | 4 | formats: 5 | - none 6 | 7 | requirements_file: docs/requirements.txt 8 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | jedi 2 | flake8 3 | mock 4 | pytest 5 | pep8 6 | pyflakes 7 | requests 8 | rope -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/tests/__init__.py -------------------------------------------------------------------------------- /tests/framework/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/tests/framework/__init__.py -------------------------------------------------------------------------------- /tests/script/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zrzka/blackmamba/b298bc5d59e5aea9d494282910faf522c08ebba9/tests/script/__init__.py --------------------------------------------------------------------------------