Skip to content

Commit

Permalink
style(ruff): upgraded and updated configuration (#12)
Browse files Browse the repository at this point in the history
* style(ruff): upgraded and updated configuration

* style(main): formatted
  • Loading branch information
kiran94 committed Jan 20, 2024
1 parent 44cf7aa commit fb034da
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 27 deletions.
11 changes: 5 additions & 6 deletions fuzzy_secret_stdout/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,25 @@
logger = logging.getLogger(__name__)



def main():
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--integration", choices=Integration.list_options(), default=Integration.AWS_SSM, type=Integration)
parser.add_argument("-b", '--max-batch-size', type=int, default=os.environ.get("FSS_MAX_BATCH_RESULTS", 50), dest='max_batch_results')
parser.add_argument('-i', '--integration', choices=Integration.list_options(), default=Integration.AWS_SSM, type=Integration)
parser.add_argument('-b', '--max-batch-size', type=int, default=os.environ.get('FSS_MAX_BATCH_RESULTS', 50), dest='max_batch_results')

args = parser.parse_args(sys.argv[1:])

search = FzfPrompt()
integration_client = create_integration(args.integration)

with Live(Spinner("dots", text=Text("Loading")), transient=True):
with Live(Spinner('dots', text=Text('Loading')), transient=True):
result: list[SecretStoreItem] = integration_client.fetch_all(max_batch_results=args.max_batch_results)

keys: list[str] = [x.key for x in result]

selected: list[str] = search.prompt(keys)

if not selected:
logger.debug("nothing was selected, exiting early.")
logger.debug('nothing was selected, exiting early.')
return

result: list[SecretStoreItem] = integration_client.fetch_secrets(selected)
Expand All @@ -43,5 +42,5 @@ def main():
sys.stdout.write(current_result.value)


if __name__ == "__main__": # pragma: nocover
if __name__ == '__main__': # pragma: nocover
main()
36 changes: 18 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ fuzzy-secret-stdout = 'fuzzy_secret_stdout.__main__:main'
line-length = 160
target-version = "py38"

[tool.ruff.flake8-quotes]
inline-quotes = "single"

[tool.ruff.format]
quote-style = "single"

0 comments on commit fb034da

Please sign in to comment.