circup 2.2.5__py3-none-any.whl → 2.2.6__py3-none-any.whl

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.
circup/command_utils.py CHANGED
@@ -122,12 +122,14 @@ def completion_for_example(ctx, param, incomplete):
122
122
 
123
123
  # pylint: disable=unused-argument, consider-iterating-dictionary
124
124
  available_examples = get_bundle_examples(get_bundles_list(), avoid_download=True)
125
-
126
- matching_examples = [
127
- example_path
128
- for example_path in available_examples.keys()
129
- if example_path.startswith(incomplete)
130
- ]
125
+ matching_examples = []
126
+ for term in incomplete:
127
+ _examples = [
128
+ example_path
129
+ for example_path in available_examples.keys()
130
+ if term in example_path
131
+ ]
132
+ matching_examples.extend(_examples)
131
133
 
132
134
  return sorted(matching_examples)
133
135
 
circup/commands.py CHANGED
@@ -415,11 +415,24 @@ def install(
415
415
  )
416
416
  @click.pass_context
417
417
  def example(ctx, examples, op_list, rename, overwrite):
418
- """
418
+ """\b
419
419
  Copy named example(s) from a bundle onto the device. Multiple examples
420
420
  can be installed at once by providing more than one example name, each
421
- separated by a space.
421
+ separated by a space. Example names are in the form of:
422
+ [short_library_name]/[example_file_name_without_py_extension]
423
+ ex: circup example bmp5xx/bmp5xx_simpletest
424
+ \b
425
+ For a list of all available library short names run:
426
+ circup example --list
427
+ \b
428
+ To search for examples run:
429
+ circup example [searchterm] --list
430
+ ex: circup example mlx --list
422
431
  """
432
+ examples = list(examples)
433
+ for i, cur_example in enumerate(examples):
434
+ if cur_example.startswith("adafruit_"):
435
+ examples[i] = cur_example.replace("adafruit_", "")
423
436
 
424
437
  if op_list:
425
438
  if examples:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: circup
3
- Version: 2.2.5
3
+ Version: 2.2.6
4
4
  Summary: A tool to manage/update libraries on CircuitPython devices.
5
5
  Author-email: Adafruit Industries <circuitpython@adafruit.com>
6
6
  License: MIT License
@@ -1,8 +1,8 @@
1
1
  circup/__init__.py,sha256=9A98U3DyA14tm-7_d88fGSlLfEKz9T_85t8kXkErqRg,662
2
2
  circup/backends.py,sha256=g9Q9xCGZidwsEDL2Ga2cm50YYB54IiqlKUPcxj-pWZA,40008
3
3
  circup/bundle.py,sha256=FEP4F470aJtwmm8jgTM3DgR3dj5SVwbX1tbyIRKVHn8,5327
4
- circup/command_utils.py,sha256=FNEhTYbbCT9UzKv4NG5lhbWHlObSEl4DQ7iDd8O0-cs,30581
5
- circup/commands.py,sha256=jrgJDmqx4U1K--_OnZoOt1d9n1QRNnInK_nBeWrThMw,28542
4
+ circup/command_utils.py,sha256=_bYFfsfXoy6ERyTSmqt-RTNuIJN9ilYolKGTF42ebyk,30676
5
+ circup/commands.py,sha256=3clk6B6oF5noA31TnuCyzIHNxxFcsoxBCVBOoy-K8fo,29082
6
6
  circup/lazy_metadata.py,sha256=69VidxGGWE13QwAAtMCPNTXTsQ2q5dJvMtclw4YaqEY,3764
7
7
  circup/logging.py,sha256=hu4v8ljkXo8ru-cqs0W3PU-xEVvTO_qqMKDJM18OXbQ,1115
8
8
  circup/module.py,sha256=33_kdy5BZn6COyIjAFZMpw00rTtPiryQZWFXQkMF8FY,7435
@@ -13,9 +13,9 @@ circup/wwshell/README.rst,sha256=M_jFP0hwOcngF0RdosdeqmVOISNcPzyjTW3duzIu9A8,361
13
13
  circup/wwshell/README.rst.license,sha256=GhA0SoZGP7CReDam-JJk_UtIQIpQaZWQFzR26YSuMm4,107
14
14
  circup/wwshell/__init__.py,sha256=CAPZiYrouWboyPx4KiWLBG_vf_n0MmArGqaFyTXGKWk,398
15
15
  circup/wwshell/commands.py,sha256=-I5l7XeoDmvWWuZg5wHdt9qe__SBQ1EGmKwCDTBMeus,7454
16
- circup-2.2.5.dist-info/licenses/LICENSE,sha256=bVlIMmSL_pqLCqae4hzixy9pYXD808IbgsMoQXTNLBk,1076
17
- circup-2.2.5.dist-info/METADATA,sha256=c-lndR68LWDH1jMrnUFp4Lhscjx5pFAtvyWm-i9Z5aA,13617
18
- circup-2.2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- circup-2.2.5.dist-info/entry_points.txt,sha256=FjTmwYD_ApgLRGifUrr_Ui1voW6fEzodQc3DKNzoAPc,69
20
- circup-2.2.5.dist-info/top_level.txt,sha256=Qx6E0eZgSBE10ciNKsLZx8-TTy_9fEVZh7NLmn24KcU,7
21
- circup-2.2.5.dist-info/RECORD,,
16
+ circup-2.2.6.dist-info/licenses/LICENSE,sha256=bVlIMmSL_pqLCqae4hzixy9pYXD808IbgsMoQXTNLBk,1076
17
+ circup-2.2.6.dist-info/METADATA,sha256=bBGt9xAlnkAhdypwfT63GgbGSjfzee1JwHJ5FFC2Euw,13617
18
+ circup-2.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
+ circup-2.2.6.dist-info/entry_points.txt,sha256=FjTmwYD_ApgLRGifUrr_Ui1voW6fEzodQc3DKNzoAPc,69
20
+ circup-2.2.6.dist-info/top_level.txt,sha256=Qx6E0eZgSBE10ciNKsLZx8-TTy_9fEVZh7NLmn24KcU,7
21
+ circup-2.2.6.dist-info/RECORD,,
File without changes