Skip to content

Commit

Permalink
Move completions files
Browse files Browse the repository at this point in the history
  • Loading branch information
hssyoo committed Apr 8, 2024
1 parent 9cd55ff commit 1557ef1
Show file tree
Hide file tree
Showing 150 changed files with 4 additions and 13 deletions.
5 changes: 0 additions & 5 deletions awscli/data/translate/2017-07-01/completions-1.json

This file was deleted.

5 changes: 0 additions & 5 deletions awscli/data/xray/2016-04-12/completions-1.json

This file was deleted.

5 changes: 3 additions & 2 deletions scripts/gen-server-completions
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ from awscli.autocomplete.autogen import BasicSingularize

# The awscli/__init__.py file sets the AWS_DATA_PATH env var, so as long
# as we import from awscli we're ensured this env var exists.
AWS_DATA_PATH = os.environ['AWS_DATA_PATH']
AWSCLI_PATH = os.path.dirname(os.environ['AWS_DATA_PATH'])
BOTOCORE_DATA_PATH = os.path.join(AWSCLI_PATH, 'botocore', 'data')


def generate_completion_data(args):
Expand All @@ -36,7 +37,7 @@ def generate_completion_data(args):
model = session.get_service_model(service_name)
completion_data = gen.generate_completion_descriptions(model)
out_filename = os.path.join(
AWS_DATA_PATH, service_name,
BOTOCORE_DATA_PATH, service_name,
model.api_version, 'completions-1.json'
)
to_json = _pretty_json_dump(completion_data)
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/autocomplete/test_server_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def tearDown(self):
def _disable_cli_loaders(self, event_name, session, **kwargs):
loader = session.get_component('data_loader')
for path in loader.search_paths[::]:
if path.endswith(os.path.join('awscli', 'data')):
if path.endswith(os.path.join('awscli', 'botocore', 'data')):
loader.search_paths.remove(path)

def test_no_errors_when_missing_completion_data(self):
Expand Down

0 comments on commit 1557ef1

Please sign in to comment.