Refactor code structure for improved readability and maintainability
This commit is contained in:
parent
389d72a136
commit
aa4c067ea8
1685 changed files with 393439 additions and 71932 deletions
|
|
@ -0,0 +1 @@
|
|||
pip
|
||||
|
|
@ -0,0 +1,356 @@
|
|||
Metadata-Version: 2.4
|
||||
Name: pathspec
|
||||
Version: 1.0.4
|
||||
Summary: Utility library for gitignore style pattern matching of file paths.
|
||||
Author-email: "Caleb P. Burns" <cpburnz@gmail.com>
|
||||
Requires-Python: >=3.9
|
||||
Description-Content-Type: text/x-rst
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Programming Language :: Python :: 3.11
|
||||
Classifier: Programming Language :: Python :: 3.12
|
||||
Classifier: Programming Language :: Python :: 3.13
|
||||
Classifier: Programming Language :: Python :: 3.14
|
||||
Classifier: Programming Language :: Python :: Implementation :: CPython
|
||||
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
||||
Classifier: Topic :: Utilities
|
||||
License-File: LICENSE
|
||||
Requires-Dist: hyperscan >=0.7 ; extra == "hyperscan"
|
||||
Requires-Dist: typing-extensions >=4 ; extra == "optional"
|
||||
Requires-Dist: google-re2 >=1.1 ; extra == "re2"
|
||||
Requires-Dist: pytest >=9 ; extra == "tests"
|
||||
Requires-Dist: typing-extensions >=4.15 ; extra == "tests"
|
||||
Project-URL: Documentation, https://python-path-specification.readthedocs.io/en/latest/index.html
|
||||
Project-URL: Issue Tracker, https://github.com/cpburnz/python-pathspec/issues
|
||||
Project-URL: Source Code, https://github.com/cpburnz/python-pathspec
|
||||
Provides-Extra: hyperscan
|
||||
Provides-Extra: optional
|
||||
Provides-Extra: re2
|
||||
Provides-Extra: tests
|
||||
|
||||
|
||||
PathSpec
|
||||
========
|
||||
|
||||
*pathspec* is a utility library for pattern matching of file paths. So far this
|
||||
only includes Git's `gitignore`_ pattern matching.
|
||||
|
||||
.. _`gitignore`: http://git-scm.com/docs/gitignore
|
||||
|
||||
|
||||
Tutorial
|
||||
--------
|
||||
|
||||
Say you have a "Projects" directory and you want to back it up, but only
|
||||
certain files, and ignore others depending on certain conditions::
|
||||
|
||||
>>> from pathspec import PathSpec
|
||||
>>> # The gitignore-style patterns for files to select, but we're including
|
||||
>>> # instead of ignoring.
|
||||
>>> spec_text = """
|
||||
...
|
||||
... # This is a comment because the line begins with a hash: "#"
|
||||
...
|
||||
... # Include several project directories (and all descendants) relative to
|
||||
... # the current directory. To reference only a directory you must end with a
|
||||
... # slash: "/"
|
||||
... /project-a/
|
||||
... /project-b/
|
||||
... /project-c/
|
||||
...
|
||||
... # Patterns can be negated by prefixing with exclamation mark: "!"
|
||||
...
|
||||
... # Ignore temporary files beginning or ending with "~" and ending with
|
||||
... # ".swp".
|
||||
... !~*
|
||||
... !*~
|
||||
... !*.swp
|
||||
...
|
||||
... # These are python projects so ignore compiled python files from
|
||||
... # testing.
|
||||
... !*.pyc
|
||||
...
|
||||
... # Ignore the build directories but only directly under the project
|
||||
... # directories.
|
||||
... !/*/build/
|
||||
...
|
||||
... """
|
||||
|
||||
The ``PathSpec`` class provides an abstraction around pattern implementations,
|
||||
and we want to compile our patterns as "gitignore" patterns. You could call it a
|
||||
wrapper for a list of compiled patterns::
|
||||
|
||||
>>> spec = PathSpec.from_lines('gitignore', spec_text.splitlines())
|
||||
|
||||
If we wanted to manually compile the patterns, we can use the ``GitIgnoreBasicPattern``
|
||||
class directly. It is used in the background for "gitignore" which internally
|
||||
converts patterns to regular expressions::
|
||||
|
||||
>>> from pathspec.patterns.gitignore.basic import GitIgnoreBasicPattern
|
||||
>>> patterns = map(GitIgnoreBasicPattern, spec_text.splitlines())
|
||||
>>> spec = PathSpec(patterns)
|
||||
|
||||
``PathSpec.from_lines()`` is a class method which simplifies that.
|
||||
|
||||
If you want to load the patterns from file, you can pass the file object
|
||||
directly as well::
|
||||
|
||||
>>> with open('patterns.list', 'r') as fh:
|
||||
>>> spec = PathSpec.from_lines('gitignore', fh)
|
||||
|
||||
You can perform matching on a whole directory tree with::
|
||||
|
||||
>>> matches = set(spec.match_tree_files('path/to/directory'))
|
||||
|
||||
Or you can perform matching on a specific set of file paths with::
|
||||
|
||||
>>> matches = set(spec.match_files(file_paths))
|
||||
|
||||
Or check to see if an individual file matches::
|
||||
|
||||
>>> is_matched = spec.match_file(file_path)
|
||||
|
||||
There's actually two implementations of "gitignore". The basic implementation is
|
||||
used by ``PathSpec`` and follows patterns as documented by `gitignore`_.
|
||||
However, Git's behavior differs from the documented patterns. There's some
|
||||
edge-cases, and in particular, Git allows including files from excluded
|
||||
directories which appears to contradict the documentation. ``GitIgnoreSpec``
|
||||
handles these cases to more closely replicate Git's behavior::
|
||||
|
||||
>>> from pathspec import GitIgnoreSpec
|
||||
>>> spec = GitIgnoreSpec.from_lines(spec_text.splitlines())
|
||||
|
||||
You do not specify the style of pattern for ``GitIgnoreSpec`` because it should
|
||||
always use ``GitIgnoreSpecPattern`` internally.
|
||||
|
||||
|
||||
Performance
|
||||
-----------
|
||||
|
||||
Running lots of regular expression matches against thousands of files in Python
|
||||
is slow. Alternate regular expression backends can be used to improve
|
||||
performance. ``PathSpec`` and ``GitIgnoreSpec`` both accept a ``backend``
|
||||
parameter to control the backend. The default is "best" to automatically choose
|
||||
the best available backend. There are currently 3 backends.
|
||||
|
||||
The "simple" backend is the default and it simply uses Python's ``re.Pattern``
|
||||
objects that are normally created. This can be the fastest when there's only 1
|
||||
or 2 patterns.
|
||||
|
||||
The "hyperscan" backend uses the `hyperscan`_ library. Hyperscan tends to be at
|
||||
least 2 times faster than "simple", and generally slower than "re2". This can be
|
||||
faster than "re2" under the right conditions with pattern counts of 1-25.
|
||||
|
||||
The "re2" backend uses the `google-re2`_ library (not to be confused with the
|
||||
*re2* library on PyPI which is unrelated and abandoned). Google's re2 tends to
|
||||
be significantly faster than "simple", and 3 times faster than "hyperscan" at
|
||||
high pattern counts.
|
||||
|
||||
See `benchmarks_backends.md`_ for comparisons between native Python regular
|
||||
expressions and the optional backends.
|
||||
|
||||
|
||||
.. _`benchmarks_backends.md`: https://github.com/cpburnz/python-pathspec/blob/master/benchmarks_backends.md
|
||||
.. _`google-re2`: https://pypi.org/project/google-re2/
|
||||
.. _`hyperscan`: https://pypi.org/project/hyperscan/
|
||||
|
||||
|
||||
FAQ
|
||||
---
|
||||
|
||||
|
||||
1. How do I ignore files like *.gitignore*?
|
||||
+++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
``GitIgnoreSpec`` (and ``PathSpec``) positively match files by default. To find
|
||||
the files to keep, and exclude files like *.gitignore*, you need to set
|
||||
``negate=True`` to flip the results::
|
||||
|
||||
>>> from pathspec import GitIgnoreSpec
|
||||
>>> spec = GitIgnoreSpec.from_lines([...])
|
||||
>>> keep_files = set(spec.match_tree_files('path/to/directory', negate=True))
|
||||
>>> ignore_files = set(spec.match_tree_files('path/to/directory'))
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
*pathspec* is licensed under the `Mozilla Public License Version 2.0`_. See
|
||||
`LICENSE`_ or the `FAQ`_ for more information.
|
||||
|
||||
In summary, you may use *pathspec* with any closed or open source project
|
||||
without affecting the license of the larger work so long as you:
|
||||
|
||||
- give credit where credit is due,
|
||||
|
||||
- and release any custom changes made to *pathspec*.
|
||||
|
||||
.. _`Mozilla Public License Version 2.0`: http://www.mozilla.org/MPL/2.0
|
||||
.. _`LICENSE`: LICENSE
|
||||
.. _`FAQ`: http://www.mozilla.org/MPL/2.0/FAQ.html
|
||||
|
||||
|
||||
Source
|
||||
------
|
||||
|
||||
The source code for *pathspec* is available from the GitHub repo
|
||||
`cpburnz/python-pathspec`_.
|
||||
|
||||
.. _`cpburnz/python-pathspec`: https://github.com/cpburnz/python-pathspec
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
*pathspec* is available for install through `PyPI`_::
|
||||
|
||||
pip install pathspec
|
||||
|
||||
*pathspec* can also be built from source. The following packages will be
|
||||
required:
|
||||
|
||||
- `build`_ (>=0.6.0)
|
||||
|
||||
*pathspec* can then be built and installed with::
|
||||
|
||||
python -m build
|
||||
pip install dist/pathspec-*-py3-none-any.whl
|
||||
|
||||
The following optional dependencies can be installed:
|
||||
|
||||
- `google-re2`_: Enables optional "re2" backend.
|
||||
- `hyperscan`_: Enables optional "hyperscan" backend.
|
||||
- `typing-extensions`_: Improves some type hints.
|
||||
|
||||
.. _`PyPI`: http://pypi.python.org/pypi/pathspec
|
||||
.. _`build`: https://pypi.org/project/build/
|
||||
.. _`typing-extensions`: https://pypi.org/project/typing-extensions/
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
Documentation for *pathspec* is available on `Read the Docs`_.
|
||||
|
||||
The full change history can be found in `CHANGES.rst`_ and `Change History`_.
|
||||
|
||||
An upgrade guide is available in `UPGRADING.rst`_ and `Upgrade Guide`_.
|
||||
|
||||
.. _`CHANGES.rst`: https://github.com/cpburnz/python-pathspec/blob/master/CHANGES.rst
|
||||
.. _`Change History`: https://python-path-specification.readthedocs.io/en/stable/changes.html
|
||||
.. _`Read the Docs`: https://python-path-specification.readthedocs.io
|
||||
.. _`UPGRADING.rst`: https://github.com/cpburnz/python-pathspec/blob/master/UPGRADING.rst
|
||||
.. _`Upgrade Guide`: https://python-path-specification.readthedocs.io/en/stable/upgrading.html
|
||||
|
||||
|
||||
Other Languages
|
||||
---------------
|
||||
|
||||
The related project `pathspec-ruby`_ (by *highb*) provides a similar library as
|
||||
a `Ruby gem`_.
|
||||
|
||||
.. _`pathspec-ruby`: https://github.com/highb/pathspec-ruby
|
||||
.. _`Ruby gem`: https://rubygems.org/gems/pathspec
|
||||
|
||||
|
||||
Change History
|
||||
==============
|
||||
|
||||
|
||||
1.0.4 (2026-01-26)
|
||||
------------------
|
||||
|
||||
- `Issue #103`_: Using re2 fails if pyre2 is also installed.
|
||||
|
||||
.. _`Issue #103`: https://github.com/cpburnz/python-pathspec/issues/103
|
||||
|
||||
|
||||
1.0.3 (2026-01-09)
|
||||
------------------
|
||||
|
||||
Bug fixes:
|
||||
|
||||
- `Issue #101`_: pyright strict errors with pathspec >= 1.0.0.
|
||||
- `Issue #102`_: No module named 'tomllib'.
|
||||
|
||||
|
||||
.. _`Issue #101`: https://github.com/cpburnz/python-pathspec/issues/101
|
||||
.. _`Issue #102`: https://github.com/cpburnz/python-pathspec/issues/102
|
||||
|
||||
|
||||
1.0.2 (2026-01-07)
|
||||
------------------
|
||||
|
||||
Bug fixes:
|
||||
|
||||
- Type hint `collections.abc.Callable` does not properly replace `typing.Callable` until Python 3.9.2.
|
||||
|
||||
|
||||
1.0.1 (2026-01-06)
|
||||
------------------
|
||||
|
||||
Bug fixes:
|
||||
|
||||
- `Issue #100`_: ValueError(f"{patterns=!r} cannot be empty.") when using black.
|
||||
|
||||
|
||||
.. _`Issue #100`: https://github.com/cpburnz/python-pathspec/issues/100
|
||||
|
||||
|
||||
1.0.0 (2026-01-05)
|
||||
------------------
|
||||
|
||||
Major changes:
|
||||
|
||||
- `Issue #91`_: Dropped support of EoL Python 3.8.
|
||||
- Added concept of backends to allow for faster regular expression matching. The backend can be controlled using the `backend` argument to `PathSpec()`, `PathSpec.from_lines()`, `GitIgnoreSpec()`, and `GitIgnoreSpec.from_lines()`.
|
||||
- Renamed "gitwildmatch" pattern back to "gitignore". The "gitignore" pattern behaves slightly differently when used with `PathSpec` (*gitignore* as documented) than with `GitIgnoreSpec` (replicates *Git*'s edge cases).
|
||||
|
||||
API changes:
|
||||
|
||||
- Breaking: protected method `pathspec.pathspec.PathSpec._match_file()` (with a leading underscore) has been removed and replaced by backends. This does not affect normal usage of `PathSpec` or `GitIgnoreSpec`. Only custom subclasses will be affected. If this breaks your usage, let me know by `opening an issue <https://github.com/cpburnz/python-pathspec/issues>`_.
|
||||
- Deprecated: "gitwildmatch" is now an alias for "gitignore".
|
||||
- Deprecated: `pathspec.patterns.GitWildMatchPattern` is now an alias for `pathspec.patterns.gitignore.spec.GitIgnoreSpecPattern`.
|
||||
- Deprecated: `pathspec.patterns.gitwildmatch` module has been replaced by the `pathspec.patterns.gitignore` package.
|
||||
- Deprecated: `pathspec.patterns.gitwildmatch.GitWildMatchPattern` is now an alias for `pathspec.patterns.gitignore.spec.GitIgnoreSpecPattern`.
|
||||
- Deprecated: `pathspec.patterns.gitwildmatch.GitWildMatchPatternError` is now an alias for `pathspec.patterns.gitignore.GitIgnorePatternError`.
|
||||
- Removed: `pathspec.patterns.gitwildmatch.GitIgnorePattern` has been deprecated since v0.4 (2016-07-15).
|
||||
- Signature of method `pathspec.pattern.RegexPattern.match_file()` has been changed from `def match_file(self, file: str) -> RegexMatchResult | None` to `def match_file(self, file: AnyStr) -> RegexMatchResult | None` to reflect usage.
|
||||
- Signature of class method `pathspec.pattern.RegexPattern.pattern_to_regex()` has been changed from `def pattern_to_regex(cls, pattern: str) -> tuple[str, bool]` to `def pattern_to_regex(cls, pattern: AnyStr) -> tuple[AnyStr | None, bool | None]` to reflect usage and documentation.
|
||||
|
||||
New features:
|
||||
|
||||
- Added optional "hyperscan" backend using `hyperscan`_ library. It will automatically be used when installed. This dependency can be installed with ``pip install 'pathspec[hyperscan]'``.
|
||||
- Added optional "re2" backend using the `google-re2`_ library. It will automatically be used when installed. This dependency can be installed with ``pip install 'pathspec[re2]'``.
|
||||
- Added optional dependency on `typing-extensions`_ library to improve some type hints.
|
||||
|
||||
Bug fixes:
|
||||
|
||||
- `Issue #93`_: Do not remove leading spaces.
|
||||
- `Issue #95`_: Matching for files inside folder does not seem to behave like .gitignore's.
|
||||
- `Issue #98`_: UnboundLocalError in RegexPattern when initialized with `pattern=None`.
|
||||
- Type hint on return value of `pathspec.pattern.RegexPattern.match_file()` to match documentation.
|
||||
|
||||
Improvements:
|
||||
|
||||
- Mark Python 3.13 and 3.14 as supported.
|
||||
- No-op patterns are now filtered out when matching files, slightly improving performance.
|
||||
- Fix performance regression in `iter_tree_files()` from v0.10.
|
||||
|
||||
|
||||
.. _`Issue #38`: https://github.com/cpburnz/python-pathspec/issues/38
|
||||
.. _`Issue #91`: https://github.com/cpburnz/python-pathspec/issues/91
|
||||
.. _`Issue #93`: https://github.com/cpburnz/python-pathspec/issues/93
|
||||
.. _`Issue #95`: https://github.com/cpburnz/python-pathspec/issues/95
|
||||
.. _`Issue #98`: https://github.com/cpburnz/python-pathspec/issues/98
|
||||
.. _`google-re2`: https://pypi.org/project/google-re2/
|
||||
.. _`hyperscan`: https://pypi.org/project/hyperscan/
|
||||
.. _`typing-extensions`: https://pypi.org/project/typing-extensions/
|
||||
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
pathspec-1.0.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
pathspec-1.0.4.dist-info/METADATA,sha256=pekHVZjpp_VHVlDo7U032-fIhSGEbY_V8jjmYrEgaWM,13755
|
||||
pathspec-1.0.4.dist-info/RECORD,,
|
||||
pathspec-1.0.4.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
||||
pathspec-1.0.4.dist-info/licenses/LICENSE,sha256=-rPda9qyJvHAhjCx3ZF-Efy07F4eAg4sFvg6ChOGPoU,16726
|
||||
pathspec/__init__.py,sha256=0PnZCecVo4UjsfA0EFGsAUikyz1jSDFmQP9gCoKXW_Y,1408
|
||||
pathspec/__pycache__/__init__.cpython-310.pyc,,
|
||||
pathspec/__pycache__/_meta.cpython-310.pyc,,
|
||||
pathspec/__pycache__/_typing.cpython-310.pyc,,
|
||||
pathspec/__pycache__/_version.cpython-310.pyc,,
|
||||
pathspec/__pycache__/backend.cpython-310.pyc,,
|
||||
pathspec/__pycache__/gitignore.cpython-310.pyc,,
|
||||
pathspec/__pycache__/pathspec.cpython-310.pyc,,
|
||||
pathspec/__pycache__/pattern.cpython-310.pyc,,
|
||||
pathspec/__pycache__/util.cpython-310.pyc,,
|
||||
pathspec/_backends/__init__.py,sha256=CjgX4uSPMC5UH4iy_IrdFXrcLQ_gwK8MKW5Qbspz_uE,130
|
||||
pathspec/_backends/__pycache__/__init__.cpython-310.pyc,,
|
||||
pathspec/_backends/__pycache__/_utils.cpython-310.pyc,,
|
||||
pathspec/_backends/__pycache__/agg.cpython-310.pyc,,
|
||||
pathspec/_backends/_utils.py,sha256=mDjbGpndOyVkt9Fue0WDWKTkk-jVqOejof9Bv9pzArE,1066
|
||||
pathspec/_backends/agg.py,sha256=naHFqYXMR53hwtgHtEHrwNJEBFpbUWbdMbF0zguxHlE,2505
|
||||
pathspec/_backends/hyperscan/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pathspec/_backends/hyperscan/__pycache__/__init__.cpython-310.pyc,,
|
||||
pathspec/_backends/hyperscan/__pycache__/_base.cpython-310.pyc,,
|
||||
pathspec/_backends/hyperscan/__pycache__/base.cpython-310.pyc,,
|
||||
pathspec/_backends/hyperscan/__pycache__/gitignore.cpython-310.pyc,,
|
||||
pathspec/_backends/hyperscan/__pycache__/pathspec.cpython-310.pyc,,
|
||||
pathspec/_backends/hyperscan/_base.py,sha256=b8E_kClW6Wtkdserr3qZzMPWVomrI4yhfxSlGVYdT3c,1719
|
||||
pathspec/_backends/hyperscan/base.py,sha256=BclDnsbCH6Fvx58YT6wqxGDcfWKNUQAcy_9jV63WkCI,563
|
||||
pathspec/_backends/hyperscan/gitignore.py,sha256=OyqtXEoZWrMB3Uh_2xNzY0aGK5UdBBjkFeGAFKQh7Oo,6761
|
||||
pathspec/_backends/hyperscan/pathspec.py,sha256=74RsGQt9x3nTxjz5S5grEQI34x8eFew78wluiIzhOpw,6500
|
||||
pathspec/_backends/re2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pathspec/_backends/re2/__pycache__/__init__.cpython-310.pyc,,
|
||||
pathspec/_backends/re2/__pycache__/_base.cpython-310.pyc,,
|
||||
pathspec/_backends/re2/__pycache__/base.cpython-310.pyc,,
|
||||
pathspec/_backends/re2/__pycache__/gitignore.cpython-310.pyc,,
|
||||
pathspec/_backends/re2/__pycache__/pathspec.cpython-310.pyc,,
|
||||
pathspec/_backends/re2/_base.py,sha256=VDThfjwEOnrDOfri_EnPifXH8pOYt71nxq3tUQAScfU,2149
|
||||
pathspec/_backends/re2/base.py,sha256=0sCZzhDpvyZLg9imO7BdE9KOmy3L0mgyHuzPhHWNbRU,462
|
||||
pathspec/_backends/re2/gitignore.py,sha256=0RPjCzg1vxE_6qDOL29V4qAyi9UnMKT2bb3k2XDimew,5094
|
||||
pathspec/_backends/re2/pathspec.py,sha256=aUtY_DdVHQyxHMbMGiovmXTIpuLKgIAeGtZerMVHIhI,4871
|
||||
pathspec/_backends/simple/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
pathspec/_backends/simple/__pycache__/__init__.cpython-310.pyc,,
|
||||
pathspec/_backends/simple/__pycache__/gitignore.cpython-310.pyc,,
|
||||
pathspec/_backends/simple/__pycache__/pathspec.cpython-310.pyc,,
|
||||
pathspec/_backends/simple/gitignore.py,sha256=45SfH2SM-YF7CppdSrQ15z7A4GUAesFzLWs8QaKdER4,2865
|
||||
pathspec/_backends/simple/pathspec.py,sha256=Zzebst2evN8-juZr5w6VBwIox7LToYT4K2zD4Jp3M7U,2095
|
||||
pathspec/_meta.py,sha256=3sxdG_ghfAmwhV7AGeJS9VUZptsmaBFVSPhQqVLpiMk,2937
|
||||
pathspec/_typing.py,sha256=xega7efBH3B4StmBzxpGvrk-yJWYKnD6Lk5Id0IiHzc,1642
|
||||
pathspec/_version.py,sha256=iV7XOjXu_8FpfpC966oeh6PC-5XA35XwWlO7oI-p2ys,64
|
||||
pathspec/backend.py,sha256=QXFus8SgZ1hKH8LZ8eOnZcyGNTO1_YQYwRM_kTkvi2M,1161
|
||||
pathspec/gitignore.py,sha256=oFWfSgeecaJFSCgI0TwdYxz0jluQxztgf-T779OxIN8,5263
|
||||
pathspec/pathspec.py,sha256=5JhgxfZTyzUcG0bEUN91xTdcvF_S9sdhXGK59nIpDOY,15151
|
||||
pathspec/pattern.py,sha256=smqkNSWc9LmPZS1MqYBGjXFXZRteiSpwF8iAy9250DY,6695
|
||||
pathspec/patterns/__init__.py,sha256=6pfTpyrSIJxN8A12hKWpa9JFvVMTR39FV3QE1HBQbho,404
|
||||
pathspec/patterns/__pycache__/__init__.cpython-310.pyc,,
|
||||
pathspec/patterns/__pycache__/gitwildmatch.cpython-310.pyc,,
|
||||
pathspec/patterns/gitignore/__init__.py,sha256=MaSAZd0DDg0vCH9k1LslaJjBJw5DkX4ty-FuLmB1z_4,422
|
||||
pathspec/patterns/gitignore/__pycache__/__init__.cpython-310.pyc,,
|
||||
pathspec/patterns/gitignore/__pycache__/base.cpython-310.pyc,,
|
||||
pathspec/patterns/gitignore/__pycache__/basic.cpython-310.pyc,,
|
||||
pathspec/patterns/gitignore/__pycache__/spec.cpython-310.pyc,,
|
||||
pathspec/patterns/gitignore/base.py,sha256=mkLYm-prSD2SXNDpxnFhL0FRV8FRPAsIBVeXyNOWjCI,4688
|
||||
pathspec/patterns/gitignore/basic.py,sha256=0pTlzzJt8qMpy-SnGHhozZVWVDH9ErPDy29MV3Q8UOw,9924
|
||||
pathspec/patterns/gitignore/spec.py,sha256=8jB3Q7Wbb6fLvtIfNax89tEtw2UZgATbAKnpGQleU8Q,10186
|
||||
pathspec/patterns/gitwildmatch.py,sha256=bF2PUtc9gOFHuFwHJ035x91y3R8An5dIY5oRibylsco,1463
|
||||
pathspec/py.typed,sha256=wq7wwDeyBungK6DsiV4O-IujgKzARwHz94uQshdpdEU,68
|
||||
pathspec/util.py,sha256=KbG9seqfTOBLPoSJ8I4CdeDFVof6rDGCMy69cZb4Du4,24728
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
Wheel-Version: 1.0
|
||||
Generator: flit 3.12.0
|
||||
Root-Is-Purelib: true
|
||||
Tag: py3-none-any
|
||||
|
|
@ -0,0 +1,373 @@
|
|||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
||||
Loading…
Add table
Add a link
Reference in a new issue