argcomplete 3.0.3__tar.gz → 3.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. {argcomplete-3.0.3 → argcomplete-3.0.4}/Changes.rst +11 -0
  2. argcomplete-3.0.4/NOTICE +4 -0
  3. {argcomplete-3.0.3 → argcomplete-3.0.4}/PKG-INFO +2 -1
  4. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/__init__.py +1 -1
  5. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/finders.py +3 -3
  6. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/lexers.py +1 -1
  7. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete.egg-info/PKG-INFO +2 -1
  8. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete.egg-info/SOURCES.txt +1 -0
  9. {argcomplete-3.0.3 → argcomplete-3.0.4}/scripts/activate-global-python-argcomplete +6 -0
  10. {argcomplete-3.0.3 → argcomplete-3.0.4}/setup.py +1 -1
  11. {argcomplete-3.0.3 → argcomplete-3.0.4}/test/test.py +4 -5
  12. {argcomplete-3.0.3 → argcomplete-3.0.4}/Authors.rst +0 -0
  13. {argcomplete-3.0.3 → argcomplete-3.0.4}/LICENSE.rst +0 -0
  14. {argcomplete-3.0.3 → argcomplete-3.0.4}/MANIFEST.in +0 -0
  15. {argcomplete-3.0.3 → argcomplete-3.0.4}/README.rst +0 -0
  16. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/_check_console_script.py +0 -0
  17. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/_check_module.py +0 -0
  18. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/bash_completion.d/python-argcomplete +0 -0
  19. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/completers.py +0 -0
  20. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/exceptions.py +0 -0
  21. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/io.py +0 -0
  22. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/packages/__init__.py +0 -0
  23. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/packages/_argparse.py +0 -0
  24. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/packages/_shlex.py +0 -0
  25. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/py.typed +0 -0
  26. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete/shell_integration.py +0 -0
  27. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete.egg-info/dependency_links.txt +0 -0
  28. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete.egg-info/not-zip-safe +0 -0
  29. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete.egg-info/requires.txt +0 -0
  30. {argcomplete-3.0.3 → argcomplete-3.0.4}/argcomplete.egg-info/top_level.txt +0 -0
  31. {argcomplete-3.0.3 → argcomplete-3.0.4}/pyproject.toml +0 -0
  32. {argcomplete-3.0.3 → argcomplete-3.0.4}/scripts/python-argcomplete-check-easy-install-script +0 -0
  33. {argcomplete-3.0.3 → argcomplete-3.0.4}/scripts/register-python-argcomplete +0 -0
  34. {argcomplete-3.0.3 → argcomplete-3.0.4}/setup.cfg +0 -0
  35. {argcomplete-3.0.3 → argcomplete-3.0.4}/test/__init__.py +0 -0
  36. {argcomplete-3.0.3 → argcomplete-3.0.4}/test/inputrc +0 -0
  37. {argcomplete-3.0.3 → argcomplete-3.0.4}/test/prog +0 -0
  38. {argcomplete-3.0.3 → argcomplete-3.0.4}/test/test_contrib_shells.py +0 -0
  39. {argcomplete-3.0.3 → argcomplete-3.0.4}/test/test_package/__init__.py +0 -0
  40. {argcomplete-3.0.3 → argcomplete-3.0.4}/test/test_package/setup.py +0 -0
  41. {argcomplete-3.0.3 → argcomplete-3.0.4}/test/test_package/test_module.py +0 -0
  42. {argcomplete-3.0.3 → argcomplete-3.0.4}/test/test_package/test_package/__init__.py +0 -0
@@ -1,3 +1,14 @@
1
+ Changes for v3.0.4 (2023-03-21)
2
+ ===============================
3
+
4
+ - activate-global-python-argcomplete: do not overwrite existing dotfile
5
+ in user directory
6
+
7
+ - Add NOTICE file
8
+
9
+ - Establish long term name for split_line as
10
+ argcomplete.lexers.split_line
11
+
1
12
  Changes for v3.0.3 (2023-03-20)
2
13
  ===============================
3
14
 
@@ -0,0 +1,4 @@
1
+ argcomplete is a free open source library that integrates Python applications with Bash and Zsh shell completion.
2
+ The argcomplete project is staffed by volunteers. If you are using this library in a for-profit project, please
3
+ contribute to argcomplete development and maintenance using the "Sponsor" button on the argcomplete GitHub project page,
4
+ https://github.com/kislyuk/argcomplete.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: argcomplete
3
- Version: 3.0.3
3
+ Version: 3.0.4
4
4
  Summary: Bash tab completion for argparse
5
5
  Home-page: https://github.com/kislyuk/argcomplete
6
6
  Author: Andrey Kislyuk
@@ -35,6 +35,7 @@ Requires-Python: >=3.6
35
35
  Provides-Extra: test
36
36
  Provides-Extra: lint
37
37
  License-File: LICENSE.rst
38
+ License-File: NOTICE
38
39
 
39
40
  argcomplete - Bash/zsh tab completion for argparse
40
41
  ==================================================
@@ -6,7 +6,7 @@ from .completers import ChoicesCompleter, DirectoriesCompleter, EnvironCompleter
6
6
  from .exceptions import ArgcompleteException
7
7
  from .finders import CompletionFinder, ExclusiveCompletionFinder, safe_actions
8
8
  from .io import debug, mute_stderr, warn
9
- from .lexers import _split_line as split_line
9
+ from .lexers import split_line
10
10
  from .shell_integration import shellcode
11
11
 
12
12
  autocomplete = CompletionFinder()
@@ -11,7 +11,7 @@ from typing import Callable, Dict, List, Optional, Sequence, Union
11
11
  from . import io as _io
12
12
  from .completers import ChoicesCompleter, FilesCompleter, SuppressCompleter
13
13
  from .io import debug, mute_stderr
14
- from .lexers import _split_line
14
+ from .lexers import split_line
15
15
  from .packages._argparse import IntrospectiveArgumentParser, action_is_greedy, action_is_open, action_is_satisfied
16
16
 
17
17
  safe_actions = {
@@ -148,7 +148,7 @@ class CompletionFinder(object):
148
148
  comp_line = os.environ["COMP_LINE"]
149
149
  comp_point = int(os.environ["COMP_POINT"])
150
150
 
151
- cword_prequote, cword_prefix, cword_suffix, comp_words, last_wordbreak_pos = _split_line(comp_line, comp_point)
151
+ cword_prequote, cword_prefix, cword_suffix, comp_words, last_wordbreak_pos = split_line(comp_line, comp_point)
152
152
 
153
153
  # _ARGCOMPLETE is set by the shell script to tell us where comp_words
154
154
  # should start, based on what we're completing.
@@ -549,7 +549,7 @@ class CompletionFinder(object):
549
549
  result = input("prompt> ")
550
550
  """
551
551
  if state == 0:
552
- cword_prequote, cword_prefix, cword_suffix, comp_words, first_colon_pos = _split_line(text)
552
+ cword_prequote, cword_prefix, cword_suffix, comp_words, first_colon_pos = split_line(text)
553
553
  comp_words.insert(0, sys.argv[0])
554
554
  matches = self._get_completions(comp_words, cword_prefix, cword_prequote, first_colon_pos)
555
555
  self._rl_matches = [text + match[len(cword_prefix) :] for match in matches]
@@ -5,7 +5,7 @@ from .io import debug
5
5
  from .packages import _shlex
6
6
 
7
7
 
8
- def _split_line(line, point=None):
8
+ def split_line(line, point=None):
9
9
  if point is None:
10
10
  point = len(line)
11
11
  line = line[:point]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: argcomplete
3
- Version: 3.0.3
3
+ Version: 3.0.4
4
4
  Summary: Bash tab completion for argparse
5
5
  Home-page: https://github.com/kislyuk/argcomplete
6
6
  Author: Andrey Kislyuk
@@ -35,6 +35,7 @@ Requires-Python: >=3.6
35
35
  Provides-Extra: test
36
36
  Provides-Extra: lint
37
37
  License-File: LICENSE.rst
38
+ License-File: NOTICE
38
39
 
39
40
  argcomplete - Bash/zsh tab completion for argparse
40
41
  ==================================================
@@ -2,6 +2,7 @@ Authors.rst
2
2
  Changes.rst
3
3
  LICENSE.rst
4
4
  MANIFEST.in
5
+ NOTICE
5
6
  README.rst
6
7
  pyproject.toml
7
8
  setup.cfg
@@ -69,6 +69,12 @@ elif args.user:
69
69
  ' using "activate-global-python-argcomplete --dest=- > completions-dir/_python-argcomplete".',
70
70
  file=sys.stderr,
71
71
  )
72
+ user_destination = os.path.expanduser("~/.bash_completion")
73
+ if os.path.exists(user_destination):
74
+ parser.error(
75
+ f'Bash user completion configuration file {user_destination} already exists. Please remove it and try '
76
+ f'again, or use "activate-global-python-argcomplete --dest=- >> {user_destination}".'
77
+ )
72
78
  destinations.append(os.path.expanduser("~/.bash_completion"))
73
79
  else:
74
80
  destinations.append(f"{get_zsh_system_dir()}/_python-argcomplete")
@@ -11,7 +11,7 @@ importlib_backport_requires = ["importlib-metadata >= 0.23, < 6"]
11
11
 
12
12
  setup(
13
13
  name="argcomplete",
14
- version="3.0.3",
14
+ version="3.0.4",
15
15
  url="https://github.com/kislyuk/argcomplete",
16
16
  project_urls={
17
17
  "Documentation": "https://kislyuk.github.io/argcomplete",
@@ -27,11 +27,10 @@ from argcomplete import ( # noqa: E402
27
27
  _check_module,
28
28
  autocomplete,
29
29
  shellcode,
30
- split_line,
31
30
  warn,
32
31
  )
33
32
  from argcomplete.completers import DirectoriesCompleter, FilesCompleter, SuppressCompleter # noqa: E402
34
- from argcomplete.lexers import _split_line # noqa: E402
33
+ from argcomplete.lexers import split_line # noqa: E402
35
34
 
36
35
  IFS = "\013"
37
36
  COMP_WORDBREAKS = " \t\n\"'><=;|&(:"
@@ -836,7 +835,7 @@ class TestArgcompleteREPL(unittest.TestCase):
836
835
  pass
837
836
 
838
837
  def run_completer(self, parser, completer, command, point=None, **kwargs):
839
- cword_prequote, cword_prefix, cword_suffix, comp_words, first_colon_pos = _split_line(command)
838
+ cword_prequote, cword_prefix, cword_suffix, comp_words, first_colon_pos = split_line(command)
840
839
 
841
840
  completions = completer._get_completions(comp_words, cword_prefix, cword_prequote, first_colon_pos)
842
841
 
@@ -948,10 +947,10 @@ class TestSplitLine(unittest.TestCase):
948
947
  os.environ = self._os_environ
949
948
 
950
949
  def prefix(self, line):
951
- return _split_line(line)[1]
950
+ return split_line(line)[1]
952
951
 
953
952
  def wordbreak(self, line):
954
- return _split_line(line)[4]
953
+ return split_line(line)[4]
955
954
 
956
955
  def test_simple(self):
957
956
  self.assertEqual(self.prefix("a b c"), "c")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes