Skip to content

Commit

Permalink
addressing easy flake8 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-tmathew committed Jul 17, 2024
1 parent 3ad238a commit b3fe451
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
11 changes: 6 additions & 5 deletions schemachange/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ def inner_extract_dictionary_secrets(
def main(argv=sys.argv):
parser = argparse.ArgumentParser(
prog="schemachange",
description="""Apply schema changes to a Snowflake account.
description="""Apply schema changes to a Snowflake account.
Full readme at https://github.com/Snowflake-Labs/schemachange""",
formatter_class=argparse.RawTextHelpFormatter,
)
Expand Down Expand Up @@ -1146,13 +1146,14 @@ def main(argv=sys.argv):
"-c",
"--change-history-table",
type=str,
help="Used to override the default name of the change history table (the default is METADATA.SCHEMACHANGE.CHANGE_HISTORY)",
help="""Used to override the default name of the change history table
(the default is METADATA.SCHEMACHANGE.CHANGE_HISTORY)""",
required=False,
)
parser_deploy.add_argument(
"--vars",
type=json.loads,
help="""Define values for the variables to be replaced in change scripts, given in JSON format
help="""Define values for the variables to be replaced in change scripts, given in JSON format
(e.g. {"variable1": "value1", "variable2": "value2"})""",
required=False,
)
Expand Down Expand Up @@ -1191,7 +1192,7 @@ def main(argv=sys.argv):
parser_deploy.add_argument(
"--oauth-config",
type=json.loads,
help="""Define values for the variables to Make Oauth Token requests
help="""Define values for the variables to Make Oauth Token requests
(e.g. {"token-provider-url": "https//...", "token-request-payload": {"client_id": "GUID_xyz",...},... })""",
required=False,
)
Expand Down Expand Up @@ -1225,7 +1226,7 @@ def main(argv=sys.argv):
parser_render.add_argument(
"--vars",
type=json.loads,
help="""Define values for the variables to be replaced in change scripts, given in JSON format
help="""Define values for the variables to be replaced in change scripts, given in JSON format
(e.g. {"variable1": "value1", "variable2": "value2"})""",
required=False,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_SecretManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_SecretManager_given_one_secrets_when_add_range_with_two_secrets_then_co
assert "two" in sm._SecretManager__secrets


##### test static methods #####
# test static methods


def test_SecretManager_check_global_assignment_round_trip():
Expand Down
9 changes: 0 additions & 9 deletions tests/test_get_all_scripts_recursively.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import os
import unittest.mock as mock

import pytest

from schemachange.cli import get_all_scripts_recursively


Expand All @@ -28,11 +26,8 @@ def test_get_all_scripts_recursively__given_just_non_change_files_should_return_
assert result == dict()



# Version file tests



def test_get_all_scripts_recursively__given_Version_files_should_return_version_files():
with mock.patch("os.walk") as mockwalk:
mockwalk.return_value = [
Expand Down Expand Up @@ -113,7 +108,6 @@ def test_get_all_scripts_recursively__given_same_version_file_with_and_without_j
)



# Always file tests

def test_get_all_scripts_recursively__given_Always_files_should_return_always_files():
Expand Down Expand Up @@ -195,11 +189,8 @@ def test_get_all_scripts_recursively__given_same_Always_file_with_and_without_ji
)


#
# Repeatable file tests



def test_get_all_scripts_recursively__given_Repeatable_files_should_return_repeatable_files():
with mock.patch("os.walk") as mockwalk:
mockwalk.return_value = [
Expand Down

0 comments on commit b3fe451

Please sign in to comment.