-
Notifications
You must be signed in to change notification settings - Fork 419
Pull Request 01 #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
websitehn
wants to merge
4
commits into
mate-academy:main
Choose a base branch
from
websitehn:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Pull Request 01 #16
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| from __future__ import annotations | ||
|
|
||
|
|
||
| __all__ = ["__version__", "version_tuple"] | ||
|
|
||
| try: | ||
| from ._version import version as __version__ | ||
| from ._version import version_tuple | ||
| except ImportError: # pragma: no cover | ||
| # broken installation, we don't even try | ||
| # unknown only works because we do poor mans version compare | ||
| __version__ = "unknown" | ||
| version_tuple = (0, 0, "unknown") |
Binary file added
BIN
+478 Bytes
venv/Lib/site-packages/_pytest/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file added
BIN
+4.71 KB
venv/Lib/site-packages/_pytest/__pycache__/_argcomplete.cpython-312.pyc
Binary file not shown.
Binary file added
BIN
+787 Bytes
venv/Lib/site-packages/_pytest/__pycache__/_version.cpython-312.pyc
Binary file not shown.
Binary file added
BIN
+30.9 KB
venv/Lib/site-packages/_pytest/__pycache__/cacheprovider.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+2.96 KB
venv/Lib/site-packages/_pytest/__pycache__/deprecated.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+4.96 KB
venv/Lib/site-packages/_pytest/__pycache__/faulthandler.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+1.79 KB
venv/Lib/site-packages/_pytest/__pycache__/freeze_support.cpython-312.pyc
Binary file not shown.
Binary file added
BIN
+12.8 KB
venv/Lib/site-packages/_pytest/__pycache__/helpconfig.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+23.6 KB
venv/Lib/site-packages/_pytest/__pycache__/legacypath.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+16.8 KB
venv/Lib/site-packages/_pytest/__pycache__/monkeypatch.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+2.43 KB
venv/Lib/site-packages/_pytest/__pycache__/pytester_assertions.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+34.6 KB
venv/Lib/site-packages/_pytest/__pycache__/python_api.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+5.62 KB
venv/Lib/site-packages/_pytest/__pycache__/threadexception.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+984 Bytes
venv/Lib/site-packages/_pytest/__pycache__/tracemalloc.cpython-312.pyc
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+6.11 KB
venv/Lib/site-packages/_pytest/__pycache__/unraisableexception.cpython-312.pyc
Binary file not shown.
Binary file added
BIN
+6.78 KB
venv/Lib/site-packages/_pytest/__pycache__/warning_types.cpython-312.pyc
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| """Allow bash-completion for argparse with argcomplete if installed. | ||
| Needs argcomplete>=0.5.6 for python 3.2/3.3 (older versions fail | ||
| to find the magic string, so _ARGCOMPLETE env. var is never set, and | ||
| this does not need special code). | ||
| Function try_argcomplete(parser) should be called directly before | ||
| the call to ArgumentParser.parse_args(). | ||
| The filescompleter is what you normally would use on the positional | ||
| arguments specification, in order to get "dirname/" after "dirn<TAB>" | ||
| instead of the default "dirname ": | ||
| optparser.add_argument(Config._file_or_dir, nargs='*').completer=filescompleter | ||
| Other, application specific, completers should go in the file | ||
| doing the add_argument calls as they need to be specified as .completer | ||
| attributes as well. (If argcomplete is not installed, the function the | ||
| attribute points to will not be used). | ||
| SPEEDUP | ||
| ======= | ||
| The generic argcomplete script for bash-completion | ||
| (/etc/bash_completion.d/python-argcomplete.sh) | ||
| uses a python program to determine startup script generated by pip. | ||
| You can speed up completion somewhat by changing this script to include | ||
| # PYTHON_ARGCOMPLETE_OK | ||
| so the python-argcomplete-check-easy-install-script does not | ||
| need to be called to find the entry point of the code and see if that is | ||
| marked with PYTHON_ARGCOMPLETE_OK. | ||
| INSTALL/DEBUGGING | ||
| ================= | ||
| To include this support in another application that has setup.py generated | ||
| scripts: | ||
| - Add the line: | ||
| # PYTHON_ARGCOMPLETE_OK | ||
| near the top of the main python entry point. | ||
| - Include in the file calling parse_args(): | ||
| from _argcomplete import try_argcomplete, filescompleter | ||
| Call try_argcomplete just before parse_args(), and optionally add | ||
| filescompleter to the positional arguments' add_argument(). | ||
| If things do not work right away: | ||
| - Switch on argcomplete debugging with (also helpful when doing custom | ||
| completers): | ||
| export _ARC_DEBUG=1 | ||
| - Run: | ||
| python-argcomplete-check-easy-install-script $(which appname) | ||
| echo $? | ||
| will echo 0 if the magic line has been found, 1 if not. | ||
| - Sometimes it helps to find early on errors using: | ||
| _ARGCOMPLETE=1 _ARC_DEBUG=1 appname | ||
| which should throw a KeyError: 'COMPLINE' (which is properly set by the | ||
| global argcomplete script). | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import argparse | ||
| from glob import glob | ||
| import os | ||
| import sys | ||
| from typing import Any | ||
|
|
||
|
|
||
| class FastFilesCompleter: | ||
| """Fast file completer class.""" | ||
|
|
||
| def __init__(self, directories: bool = True) -> None: | ||
| self.directories = directories | ||
|
|
||
| def __call__(self, prefix: str, **kwargs: Any) -> list[str]: | ||
| # Only called on non option completions. | ||
| if os.sep in prefix[1:]: | ||
| prefix_dir = len(os.path.dirname(prefix) + os.sep) | ||
| else: | ||
| prefix_dir = 0 | ||
| completion = [] | ||
| globbed = [] | ||
| if "*" not in prefix and "?" not in prefix: | ||
| # We are on unix, otherwise no bash. | ||
| if not prefix or prefix[-1] == os.sep: | ||
| globbed.extend(glob(prefix + ".*")) | ||
| prefix += "*" | ||
| globbed.extend(glob(prefix)) | ||
| for x in sorted(globbed): | ||
| if os.path.isdir(x): | ||
| x += "/" | ||
| # Append stripping the prefix (like bash, not like compgen). | ||
| completion.append(x[prefix_dir:]) | ||
| return completion | ||
|
|
||
|
|
||
| if os.environ.get("_ARGCOMPLETE"): | ||
| try: | ||
| import argcomplete.completers | ||
| except ImportError: | ||
| sys.exit(-1) | ||
| filescompleter: FastFilesCompleter | None = FastFilesCompleter() | ||
|
|
||
| def try_argcomplete(parser: argparse.ArgumentParser) -> None: | ||
| argcomplete.autocomplete(parser, always_complete_options=False) | ||
|
|
||
| else: | ||
|
|
||
| def try_argcomplete(parser: argparse.ArgumentParser) -> None: | ||
| pass | ||
|
|
||
| filescompleter = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| """Python inspection/code generation API.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from .code import Code | ||
| from .code import ExceptionInfo | ||
| from .code import filter_traceback | ||
| from .code import Frame | ||
| from .code import getfslineno | ||
| from .code import Traceback | ||
| from .code import TracebackEntry | ||
| from .source import getrawcode | ||
| from .source import Source | ||
|
|
||
|
|
||
| __all__ = [ | ||
| "Code", | ||
| "ExceptionInfo", | ||
| "Frame", | ||
| "Source", | ||
| "Traceback", | ||
| "TracebackEntry", | ||
| "filter_traceback", | ||
| "getfslineno", | ||
| "getrawcode", | ||
| ] |
Binary file added
BIN
+684 Bytes
venv/Lib/site-packages/_pytest/_code/__pycache__/__init__.cpython-312.pyc
Binary file not shown.
Binary file added
BIN
+66.4 KB
venv/Lib/site-packages/_pytest/_code/__pycache__/code.cpython-312.pyc
Binary file not shown.
Binary file added
BIN
+11.7 KB
venv/Lib/site-packages/_pytest/_code/__pycache__/source.cpython-312.pyc
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please Check this chancge