EditorConfig-0.12.1/0000775000175000017500000000000012761055033014143 5ustar treytrey00000000000000EditorConfig-0.12.1/EditorConfig.egg-info/0000775000175000017500000000000012761055033020211 5ustar treytrey00000000000000EditorConfig-0.12.1/EditorConfig.egg-info/entry_points.txt0000664000175000017500000000007112761055033023505 0ustar treytrey00000000000000[console_scripts] editorconfig = editorconfig.main:main EditorConfig-0.12.1/EditorConfig.egg-info/SOURCES.txt0000664000175000017500000000067112761055033022101 0ustar treytrey00000000000000LICENSE.txt MANIFEST.in README.rst setup.py EditorConfig.egg-info/PKG-INFO EditorConfig.egg-info/SOURCES.txt EditorConfig.egg-info/dependency_links.txt EditorConfig.egg-info/entry_points.txt EditorConfig.egg-info/top_level.txt editorconfig/__init__.py editorconfig/compat.py editorconfig/exceptions.py editorconfig/fnmatch.py editorconfig/handler.py editorconfig/ini.py editorconfig/main.py editorconfig/odict.py editorconfig/versiontools.pyEditorConfig-0.12.1/EditorConfig.egg-info/PKG-INFO0000664000175000017500000000756012761055033021316 0ustar treytrey00000000000000Metadata-Version: 1.1 Name: EditorConfig Version: 0.12.1 Summary: EditorConfig File Locator and Interpreter for Python Home-page: http://editorconfig.org/ Author: EditorConfig Team Author-email: UNKNOWN License: LICENSE.txt Description: ======================== EditorConfig Python Core ======================== .. image:: https://secure.travis-ci.org/editorconfig/editorconfig-core-py.svg?branch=master :target: http://travis-ci.org/editorconfig/editorconfig-core-py EditorConfig Python Core provides the same functionality as the `EditorConfig C Core `_. EditorConfig Python core can be used as a command line program or as an importable library. EditorConfig Project ==================== EditorConfig makes it easy to maintain the correct coding style when switching between different text editors and between different projects. The EditorConfig project maintains a file format and plugins for various text editors which allow this file format to be read and used by those editors. For information on the file format and supported text editors, see the `EditorConfig website `_. Installation ============ With setuptools:: sudo python setup.py install Getting Help ============ For help with the EditorConfig core code, please write to our `mailing list `_. Bugs and feature requests should be submitted to our `issue tracker `_. If you are writing a plugin a language that can import Python libraries, you may want to import and use the EditorConfig Python Core directly. Using as a Library ================== Basic example use of EditorConfig Python Core as a library: .. code-block:: python from editorconfig import get_properties, EditorConfigError filename = "/home/zoidberg/humans/anatomy.md" try: options = get_properties(filename) except EditorConfigError: print "Error occurred while getting EditorConfig properties" else: for key, value in options.items(): print "%s=%s" % (key, value) For details, please take a look at the `online documentation `_. Running Test Cases ================== `Cmake `_ has to be installed first. Run the test cases using the following commands:: cmake . ctest . Use ``-DPYTHON_EXECUTABLE`` to run the tests using an alternative versions of Python (e.g. Python 3):: cmake -DPYTHON_EXECUTABLE=/usr/bin/python3 . ctest . License ======= Unless otherwise stated, all files are distributed under the PSF license. The odict library (editorconfig/odict.py) is distributed under the New BSD license. See LICENSE.txt file for details on PSF license. Platform: UNKNOWN Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.2 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: Implementation :: PyPy EditorConfig-0.12.1/EditorConfig.egg-info/dependency_links.txt0000664000175000017500000000000112761055033024257 0ustar treytrey00000000000000 EditorConfig-0.12.1/EditorConfig.egg-info/top_level.txt0000664000175000017500000000001512761055033022737 0ustar treytrey00000000000000editorconfig EditorConfig-0.12.1/setup.py0000664000175000017500000000170112423103214015642 0ustar treytrey00000000000000from setuptools import setup import editorconfig setup( name='EditorConfig', version=editorconfig.__version__, author='EditorConfig Team', packages=['editorconfig'], url='http://editorconfig.org/', license='LICENSE.txt', description='EditorConfig File Locator and Interpreter for Python', long_description=open('README.rst').read(), entry_points = { 'console_scripts': [ 'editorconfig = editorconfig.main:main', ] }, classifiers=[ 'Operating System :: OS Independent', 'Programming Language :: Python', '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', 'Programming Language :: Python :: Implementation :: PyPy', ], ) EditorConfig-0.12.1/README.rst0000664000175000017500000000502712761053723015642 0ustar treytrey00000000000000======================== EditorConfig Python Core ======================== .. image:: https://secure.travis-ci.org/editorconfig/editorconfig-core-py.svg?branch=master :target: http://travis-ci.org/editorconfig/editorconfig-core-py EditorConfig Python Core provides the same functionality as the `EditorConfig C Core `_. EditorConfig Python core can be used as a command line program or as an importable library. EditorConfig Project ==================== EditorConfig makes it easy to maintain the correct coding style when switching between different text editors and between different projects. The EditorConfig project maintains a file format and plugins for various text editors which allow this file format to be read and used by those editors. For information on the file format and supported text editors, see the `EditorConfig website `_. Installation ============ With setuptools:: sudo python setup.py install Getting Help ============ For help with the EditorConfig core code, please write to our `mailing list `_. Bugs and feature requests should be submitted to our `issue tracker `_. If you are writing a plugin a language that can import Python libraries, you may want to import and use the EditorConfig Python Core directly. Using as a Library ================== Basic example use of EditorConfig Python Core as a library: .. code-block:: python from editorconfig import get_properties, EditorConfigError filename = "/home/zoidberg/humans/anatomy.md" try: options = get_properties(filename) except EditorConfigError: print "Error occurred while getting EditorConfig properties" else: for key, value in options.items(): print "%s=%s" % (key, value) For details, please take a look at the `online documentation `_. Running Test Cases ================== `Cmake `_ has to be installed first. Run the test cases using the following commands:: cmake . ctest . Use ``-DPYTHON_EXECUTABLE`` to run the tests using an alternative versions of Python (e.g. Python 3):: cmake -DPYTHON_EXECUTABLE=/usr/bin/python3 . ctest . License ======= Unless otherwise stated, all files are distributed under the PSF license. The odict library (editorconfig/odict.py) is distributed under the New BSD license. See LICENSE.txt file for details on PSF license. EditorConfig-0.12.1/editorconfig/0000775000175000017500000000000012761055033016617 5ustar treytrey00000000000000EditorConfig-0.12.1/editorconfig/exceptions.py0000644000175000017500000000123612316654065021360 0ustar treytrey00000000000000"""EditorConfig exception classes Licensed under PSF License (see LICENSE.txt file). """ class EditorConfigError(Exception): """Parent class of all exceptions raised by EditorConfig""" try: from ConfigParser import ParsingError as _ParsingError except: from configparser import ParsingError as _ParsingError class ParsingError(_ParsingError, EditorConfigError): """Error raised if an EditorConfig file could not be parsed""" class PathError(ValueError, EditorConfigError): """Error raised if invalid filepath is specified""" class VersionError(ValueError, EditorConfigError): """Error raised if invalid version number is specified""" EditorConfig-0.12.1/editorconfig/compat.py0000664000175000017500000000070712761053720020461 0ustar treytrey00000000000000"""EditorConfig Python2/Python3 compatibility utilities""" import sys __all__ = ['force_unicode', 'u'] if sys.version_info[0] == 2: text_type = unicode else: text_type = str def force_unicode(string): if not isinstance(string, text_type): string = text_type(string, encoding='utf-8') return string if sys.version_info[0] == 2: import codecs u = lambda s: codecs.unicode_escape_decode(s)[0] else: u = lambda s: s EditorConfig-0.12.1/editorconfig/ini.py0000664000175000017500000001447012761053720017757 0ustar treytrey00000000000000"""EditorConfig file parser Based on code from ConfigParser.py file distributed with Python 2.6. Licensed under PSF License (see LICENSE.txt file). Changes to original ConfigParser: - Special characters can be used in section names - Octothorpe can be used for comments (not just at beginning of line) - Only track INI options in sections that match target filename - Stop parsing files with when ``root = true`` is found """ import re from codecs import open import posixpath from os import sep from os.path import normpath, dirname from editorconfig.exceptions import ParsingError from editorconfig.fnmatch import fnmatch from editorconfig.odict import OrderedDict from editorconfig.compat import u __all__ = ["ParsingError", "EditorConfigParser"] class EditorConfigParser(object): """Parser for EditorConfig-style configuration files Based on RawConfigParser from ConfigParser.py in Python 2.6. """ # Regular expressions for parsing section headers and options. # Allow ``]`` and escaped ``;`` and ``#`` characters in section headers SECTCRE = re.compile( r""" \s * # Optional whitespace \[ # Opening square brace (?P
# One or more characters excluding ( [^\#;] | \\\# | \\; ) + # unescaped # and ; characters ) \] # Closing square brace """, re.VERBOSE ) # Regular expression for parsing option name/values. # Allow any amount of whitespaces, followed by separator # (either ``:`` or ``=``), followed by any amount of whitespace and then # any characters to eol OPTCRE = re.compile( r""" \s * # Optional whitespace (?P