Skip to content

Commit

Permalink
eliminate lint and build error:
Browse files Browse the repository at this point in the history
ERROR: setuptools==58.1.0 is used in combination with setuptools_scm>=8.x
  • Loading branch information
sagerb committed Oct 26, 2023
1 parent 2cdc988 commit ba8e8df
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies = [
"pip>=10.0.0",
"semver>=2.0.0,<3.0.0",
"pyjwt>=2.4.0",
"click>=8.0.0",
]

dynamic = ["version"]
Expand All @@ -33,9 +34,9 @@ test = [
"pytest-cov",
"pytest-mypy",
"pytest",
"setuptools_scm[toml]",
"setuptools>=61",
"setuptools_scm[toml]>=3.4",
"twine",
"types-click",
"types-Flask",
"types-six",
]
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ wheel

# project.dependencies
six>=1.14.0
click>=7.0.0
click>=8.0.0
pip>=10.0.0
semver>=2.0.0,<3.0.0
pyjwt>=2.4.0
Expand All @@ -29,6 +29,5 @@ pytest-mypy
pytest
setuptools_scm[toml]
twine
types-click
types-Flask
types-six
2 changes: 1 addition & 1 deletion rsconnect/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def output_params(
varName = k.replace("-", "_")
if varName in {"api_key"}:
val = "**********"
source = ctx.get_parameter_source(varName)
source = ctx.get_parameter_source(varName) # type: ignore
if source:
click.echo(" {}:\t{} (from {})".format(k, val, source.name)) # type: ignore
else:
Expand Down
21 changes: 8 additions & 13 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,11 +1152,9 @@ def test_bootstrap_invalid_server(self):
result = runner.invoke(cli, ["bootstrap", "--server", "123.some.ip.address", "--jwt-keypath", self.jwt_keypath])
self.assertEqual(result.exit_code, 1, result.output)
self.assertGreater(
result.output.find("Error: Server URL expected to begin with transfer protocol (ex. http/https).\n"),
-1
result.output.find("Error: Server URL expected to begin with transfer protocol (ex. http/https).\n"), -1
)


def test_boostrap_missing_jwt_option(self):
"""
If jwt keyfile is not specified, it needs to be set using an environment variable
Expand All @@ -1165,8 +1163,7 @@ def test_boostrap_missing_jwt_option(self):
result = runner.invoke(cli, ["bootstrap", "--server", "http://a_server"])
self.assertEqual(result.exit_code, 1, result.output)
self.assertGreater(
result.output.find("Error: Must specify secret key using either a keyfile or environment variable.\n"),
-1
result.output.find("Error: Must specify secret key using either a keyfile or environment variable.\n"), -1
)

def test_bootstrap_conflicting_jwt_option(self):
Expand All @@ -1179,8 +1176,7 @@ def test_bootstrap_conflicting_jwt_option(self):
result = runner.invoke(cli, self.default_cli_args)
self.assertEqual(result.exit_code, 1, result.output)
self.assertGreater(
result.output.find("Error: Cannot specify secret key using both a keyfile and environment variable."),
-1
result.output.find("Error: Cannot specify secret key using both a keyfile and environment variable."), -1
)

del os.environ[SECRET_KEY_ENV]
Expand All @@ -1195,8 +1191,10 @@ def test_bootstrap_invalid_env_secret_key(self):
result = runner.invoke(cli, ["bootstrap", "--server", "http://a_server"])
self.assertEqual(result.exit_code, 1, result.output)
self.assertGreater(
result.output.find("Error: Unable to decode base64 data from environment variable: CONNECT_BOOTSTRAP_SECRETKEY\n"),
-1
result.output.find(
"Error: Unable to decode base64 data from environment variable: CONNECT_BOOTSTRAP_SECRETKEY\n"
),
-1,
)

del os.environ[SECRET_KEY_ENV]
Expand Down Expand Up @@ -1238,7 +1236,4 @@ def test_boostrap_raw_output_nonsuccess(self):

self.assertEqual(result.exit_code, 0, result.output)

self.assertEqual(
result.output.find("Error:"),
-1
)
self.assertEqual(result.output.find("Error:"), -1)

0 comments on commit ba8e8df

Please sign in to comment.