From 12cf076118570eebbff08c6b3090e0d4798447a1 Mon Sep 17 00:00:00 2001 From: cyfraeviolae Date: Wed, 3 Apr 2024 03:17:55 -0400 Subject: no venv --- .../site-packages/editorconfig/__init__.py | 18 -- .../site-packages/editorconfig/__main__.py | 82 -------- .../__pycache__/__init__.cpython-311.pyc | Bin 947 -> 0 bytes .../__pycache__/__main__.cpython-311.pyc | Bin 4419 -> 0 bytes .../__pycache__/compat.cpython-311.pyc | Bin 1107 -> 0 bytes .../__pycache__/exceptions.cpython-311.pyc | Bin 1614 -> 0 bytes .../__pycache__/fnmatch.cpython-311.pyc | Bin 7505 -> 0 bytes .../__pycache__/handler.cpython-311.pyc | Bin 5119 -> 0 bytes .../editorconfig/__pycache__/ini.cpython-311.pyc | Bin 7410 -> 0 bytes .../__pycache__/version.cpython-311.pyc | Bin 228 -> 0 bytes .../__pycache__/versiontools.cpython-311.pyc | Bin 1612 -> 0 bytes .../site-packages/editorconfig/compat.py | 24 --- .../site-packages/editorconfig/exceptions.py | 27 --- .../site-packages/editorconfig/fnmatch.py | 223 --------------------- .../site-packages/editorconfig/handler.py | 127 ------------ .../python3.11/site-packages/editorconfig/ini.py | 183 ----------------- .../site-packages/editorconfig/version.py | 1 - .../site-packages/editorconfig/versiontools.py | 35 ---- 18 files changed, 720 deletions(-) delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/__init__.py delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/__main__.py delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/__pycache__/__init__.cpython-311.pyc delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/__pycache__/__main__.cpython-311.pyc delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/__pycache__/compat.cpython-311.pyc delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/__pycache__/exceptions.cpython-311.pyc delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/__pycache__/fnmatch.cpython-311.pyc delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/__pycache__/handler.cpython-311.pyc delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/__pycache__/ini.cpython-311.pyc delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/__pycache__/version.cpython-311.pyc delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/__pycache__/versiontools.cpython-311.pyc delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/compat.py delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/exceptions.py delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/fnmatch.py delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/handler.py delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/ini.py delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/version.py delete mode 100644 venv/lib/python3.11/site-packages/editorconfig/versiontools.py (limited to 'venv/lib/python3.11/site-packages/editorconfig') diff --git a/venv/lib/python3.11/site-packages/editorconfig/__init__.py b/venv/lib/python3.11/site-packages/editorconfig/__init__.py deleted file mode 100644 index 2574ce4..0000000 --- a/venv/lib/python3.11/site-packages/editorconfig/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -"""EditorConfig Python Core""" - -from editorconfig.versiontools import join_version -from editorconfig.version import VERSION - -__all__ = ['get_properties', 'EditorConfigError', 'exceptions'] - -__version__ = join_version(VERSION) - - -def get_properties(filename): - """Locate and parse EditorConfig files for the given filename""" - handler = EditorConfigHandler(filename) - return handler.get_configurations() - - -from editorconfig.handler import EditorConfigHandler -from editorconfig.exceptions import * diff --git a/venv/lib/python3.11/site-packages/editorconfig/__main__.py b/venv/lib/python3.11/site-packages/editorconfig/__main__.py deleted file mode 100644 index fc98b6f..0000000 --- a/venv/lib/python3.11/site-packages/editorconfig/__main__.py +++ /dev/null @@ -1,82 +0,0 @@ -"""EditorConfig command line interface - -Licensed under Simplified BSD License (see LICENSE.BSD file). - -""" - -import getopt -import sys - -from editorconfig import VERSION, __version__ -from editorconfig.compat import force_unicode -from editorconfig.exceptions import ParsingError, PathError, VersionError -from editorconfig.handler import EditorConfigHandler -from editorconfig.versiontools import split_version - - -def version(): - print("EditorConfig Python Core Version %s" % __version__) - - -def usage(command, error=False): - if error: - out = sys.stderr - else: - out = sys.stdout - out.write("%s [OPTIONS] FILENAME\n" % command) - out.write('-f ' - 'Specify conf filename other than ".editorconfig".\n') - out.write("-b " - "Specify version (used by devs to test compatibility).\n") - out.write("-h OR --help Print this help message.\n") - out.write("-v OR --version Display version information.\n") - - -def main(): - command_name = sys.argv[0] - try: - opts, args = getopt.getopt(list(map(force_unicode, sys.argv[1:])), - "vhb:f:", ["version", "help"]) - except getopt.GetoptError as e: - print(str(e)) - usage(command_name, error=True) - sys.exit(2) - - version_tuple = VERSION - conf_filename = '.editorconfig' - - for option, arg in opts: - if option in ('-h', '--help'): - usage(command_name) - sys.exit() - if option in ('-v', '--version'): - version() - sys.exit() - if option == '-f': - conf_filename = arg - if option == '-b': - version_tuple = split_version(arg) - if version_tuple is None: - sys.exit("Invalid version number: %s" % arg) - - if len(args) < 1: - usage(command_name, error=True) - sys.exit(2) - filenames = args - multiple_files = len(args) > 1 - - for filename in filenames: - handler = EditorConfigHandler(filename, conf_filename, version_tuple) - try: - options = handler.get_configurations() - except (ParsingError, PathError, VersionError) as e: - print(str(e)) - sys.exit(2) - if multiple_files: - print("[%s]" % filename) - for key, value in options.items(): - print("%s=%s" % (key, value)) - - -if __name__ == "__main__": - main() diff --git a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/__init__.cpython-311.pyc b/venv/lib/python3.11/site-packages/editorconfig/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 35f562f..0000000 Binary files a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/__init__.cpython-311.pyc and /dev/null differ diff --git a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/__main__.cpython-311.pyc b/venv/lib/python3.11/site-packages/editorconfig/__pycache__/__main__.cpython-311.pyc deleted file mode 100644 index 5343829..0000000 Binary files a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/__main__.cpython-311.pyc and /dev/null differ diff --git a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/compat.cpython-311.pyc b/venv/lib/python3.11/site-packages/editorconfig/__pycache__/compat.cpython-311.pyc deleted file mode 100644 index 1686a75..0000000 Binary files a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/compat.cpython-311.pyc and /dev/null differ diff --git a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/exceptions.cpython-311.pyc b/venv/lib/python3.11/site-packages/editorconfig/__pycache__/exceptions.cpython-311.pyc deleted file mode 100644 index 511078f..0000000 Binary files a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/exceptions.cpython-311.pyc and /dev/null differ diff --git a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/fnmatch.cpython-311.pyc b/venv/lib/python3.11/site-packages/editorconfig/__pycache__/fnmatch.cpython-311.pyc deleted file mode 100644 index 5d4a548..0000000 Binary files a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/fnmatch.cpython-311.pyc and /dev/null differ diff --git a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/handler.cpython-311.pyc b/venv/lib/python3.11/site-packages/editorconfig/__pycache__/handler.cpython-311.pyc deleted file mode 100644 index 8504183..0000000 Binary files a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/handler.cpython-311.pyc and /dev/null differ diff --git a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/ini.cpython-311.pyc b/venv/lib/python3.11/site-packages/editorconfig/__pycache__/ini.cpython-311.pyc deleted file mode 100644 index 65d5307..0000000 Binary files a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/ini.cpython-311.pyc and /dev/null differ diff --git a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/version.cpython-311.pyc b/venv/lib/python3.11/site-packages/editorconfig/__pycache__/version.cpython-311.pyc deleted file mode 100644 index 2f937fa..0000000 Binary files a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/version.cpython-311.pyc and /dev/null differ diff --git a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/versiontools.cpython-311.pyc b/venv/lib/python3.11/site-packages/editorconfig/__pycache__/versiontools.cpython-311.pyc deleted file mode 100644 index 69373b5..0000000 Binary files a/venv/lib/python3.11/site-packages/editorconfig/__pycache__/versiontools.cpython-311.pyc and /dev/null differ diff --git a/venv/lib/python3.11/site-packages/editorconfig/compat.py b/venv/lib/python3.11/site-packages/editorconfig/compat.py deleted file mode 100644 index 4b9f8ca..0000000 --- a/venv/lib/python3.11/site-packages/editorconfig/compat.py +++ /dev/null @@ -1,24 +0,0 @@ -"""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 diff --git a/venv/lib/python3.11/site-packages/editorconfig/exceptions.py b/venv/lib/python3.11/site-packages/editorconfig/exceptions.py deleted file mode 100644 index c25f681..0000000 --- a/venv/lib/python3.11/site-packages/editorconfig/exceptions.py +++ /dev/null @@ -1,27 +0,0 @@ -"""EditorConfig exception classes - -Licensed under Simplified BSD License (see LICENSE.BSD 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""" diff --git a/venv/lib/python3.11/site-packages/editorconfig/fnmatch.py b/venv/lib/python3.11/site-packages/editorconfig/fnmatch.py deleted file mode 100644 index 76692b8..0000000 --- a/venv/lib/python3.11/site-packages/editorconfig/fnmatch.py +++ /dev/null @@ -1,223 +0,0 @@ -"""Filename matching with shell patterns. - -fnmatch(FILENAME, PATTERN) matches according to the local convention. -fnmatchcase(FILENAME, PATTERN) always takes case in account. - -The functions operate by translating the pattern into a regular -expression. They cache the compiled regular expressions for speed. - -The function translate(PATTERN) returns a regular expression -corresponding to PATTERN. (It does not compile it.) - -Based on code from fnmatch.py file distributed with Python 2.6. - -Licensed under PSF License (see LICENSE.PSF file). - -Changes to original fnmatch module: -- translate function supports ``*`` and ``**`` similarly to fnmatch C library -""" - -import os -import re - - -__all__ = ["fnmatch", "fnmatchcase", "translate"] - -_cache = {} - -LEFT_BRACE = re.compile( - r""" - - (? 0 and not is_escaped: - result += '|' - else: - result += '\\,' - elif current_char == '}': - if brace_level > 0 and not is_escaped: - result += ')' - brace_level -= 1 - else: - result += '\\}' - elif current_char == '/': - if pat[index:(index + 3)] == "**/": - result += "(?:/|/.*/)" - index += 3 - else: - result += '/' - elif current_char != '\\': - result += re.escape(current_char) - if current_char == '\\': - if is_escaped: - result += re.escape(current_char) - is_escaped = not is_escaped - else: - is_escaped = False - if not nested: - result = r'(?s)%s\Z' % result - return result, numeric_groups diff --git a/venv/lib/python3.11/site-packages/editorconfig/handler.py b/venv/lib/python3.11/site-packages/editorconfig/handler.py deleted file mode 100644 index 1c33c02..0000000 --- a/venv/lib/python3.11/site-packages/editorconfig/handler.py +++ /dev/null @@ -1,127 +0,0 @@ -"""EditorConfig file handler - -Provides ``EditorConfigHandler`` class for locating and parsing -EditorConfig files relevant to a given filepath. - -Licensed under Simplified BSD License (see LICENSE.BSD file). - -""" - -import os - -from editorconfig import VERSION -from editorconfig.exceptions import PathError, VersionError -from editorconfig.ini import EditorConfigParser - - -__all__ = ['EditorConfigHandler'] - - -def get_filenames(path, filename): - """Yield full filepath for filename in each directory in and above path""" - path_list = [] - while True: - path_list.append(os.path.join(path, filename)) - newpath = os.path.dirname(path) - if path == newpath: - break - path = newpath - return path_list - - -class EditorConfigHandler(object): - - """ - Allows locating and parsing of EditorConfig files for given filename - - In addition to the constructor a single public method is provided, - ``get_configurations`` which returns the EditorConfig options for - the ``filepath`` specified to the constructor. - - """ - - def __init__(self, filepath, conf_filename='.editorconfig', - version=VERSION): - """Create EditorConfigHandler for matching given filepath""" - self.filepath = filepath - self.conf_filename = conf_filename - self.version = version - self.options = None - - def get_configurations(self): - - """ - Find EditorConfig files and return all options matching filepath - - Special exceptions that may be raised by this function include: - - - ``VersionError``: self.version is invalid EditorConfig version - - ``PathError``: self.filepath is not a valid absolute filepath - - ``ParsingError``: improperly formatted EditorConfig file found - - """ - - self.check_assertions() - path, filename = os.path.split(self.filepath) - conf_files = get_filenames(path, self.conf_filename) - - # Attempt to find and parse every EditorConfig file in filetree - for filename in conf_files: - parser = EditorConfigParser(self.filepath) - parser.read(filename) - - # Merge new EditorConfig file's options into current options - old_options = self.options - self.options = parser.options - if old_options: - self.options.update(old_options) - - # Stop parsing if parsed file has a ``root = true`` option - if parser.root_file: - break - - self.preprocess_values() - return self.options - - def check_assertions(self): - - """Raise error if filepath or version have invalid values""" - - # Raise ``PathError`` if filepath isn't an absolute path - if not os.path.isabs(self.filepath): - raise PathError("Input file must be a full path name.") - - # Raise ``VersionError`` if version specified is greater than current - if self.version is not None and self.version[:3] > VERSION[:3]: - raise VersionError( - "Required version is greater than the current version.") - - def preprocess_values(self): - - """Preprocess option values for consumption by plugins""" - - opts = self.options - - # Lowercase option value for certain options - for name in ["end_of_line", "indent_style", "indent_size", - "insert_final_newline", "trim_trailing_whitespace", - "charset"]: - if name in opts: - opts[name] = opts[name].lower() - - # Set indent_size to "tab" if indent_size is unspecified and - # indent_style is set to "tab". - if (opts.get("indent_style") == "tab" and - not "indent_size" in opts and self.version >= (0, 10, 0)): - opts["indent_size"] = "tab" - - # Set tab_width to indent_size if indent_size is specified and - # tab_width is unspecified - if ("indent_size" in opts and "tab_width" not in opts and - opts["indent_size"] != "tab"): - opts["tab_width"] = opts["indent_size"] - - # Set indent_size to tab_width if indent_size is "tab" - if ("indent_size" in opts and "tab_width" in opts and - opts["indent_size"] == "tab"): - opts["indent_size"] = opts["tab_width"] diff --git a/venv/lib/python3.11/site-packages/editorconfig/ini.py b/venv/lib/python3.11/site-packages/editorconfig/ini.py deleted file mode 100644 index c603d79..0000000 --- a/venv/lib/python3.11/site-packages/editorconfig/ini.py +++ /dev/null @@ -1,183 +0,0 @@ -"""EditorConfig file parser - -Based on code from ConfigParser.py file distributed with Python 2.6. - -Licensed under PSF License (see LICENSE.PSF 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 posixpath -import re -from codecs import open -from collections import OrderedDict -from os import sep -from os.path import dirname, normpath - -from editorconfig.compat import u -from editorconfig.exceptions import ParsingError -from editorconfig.fnmatch import fnmatch - - -__all__ = ["ParsingError", "EditorConfigParser"] - -MAX_SECTION_LENGTH = 4096 -MAX_PROPERTY_LENGTH= 50 -MAX_VALUE_LENGTH = 255 - - -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