Skip to content

Commit

Permalink
python 3.8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mslynch committed Sep 11, 2023
1 parent f476183 commit 06cb76b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion rsconnect/bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@ def _create_quarto_file_list(
@dataclasses.dataclass
class QuartoManifestInfo:
manifest: Manifest
relevant_files: list[str]
relevant_files: typing.List[str]


def make_quarto_manifest(
Expand Down
25 changes: 9 additions & 16 deletions tests/test_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,9 @@ def test_make_quarto_source_bundle_from_project(self):
},
}

with (
make_quarto_source_bundle(
temp_proj, inspect, AppModes.STATIC_QUARTO, environment, [], [], None
).bundle as bundle,
tarfile.open(mode="r:gz", fileobj=bundle) as tar,
):
with make_quarto_source_bundle(
temp_proj, inspect, AppModes.STATIC_QUARTO, environment, [], [], None
).bundle as bundle, tarfile.open(mode="r:gz", fileobj=bundle) as tar:
names = sorted(tar.getnames())
self.assertEqual(
names,
Expand Down Expand Up @@ -341,12 +338,9 @@ def test_make_quarto_source_bundle_from_project_with_requirements(self):
},
}

with (
make_quarto_source_bundle(
temp_proj, inspect, AppModes.STATIC_QUARTO, environment, [], [], None
).bundle as bundle,
tarfile.open(mode="r:gz", fileobj=bundle) as tar,
):
with make_quarto_source_bundle(
temp_proj, inspect, AppModes.STATIC_QUARTO, environment, [], [], None
).bundle as bundle, tarfile.open(mode="r:gz", fileobj=bundle) as tar:
names = sorted(tar.getnames())
self.assertEqual(
names,
Expand Down Expand Up @@ -405,10 +399,9 @@ def test_make_quarto_source_bundle_from_file(self):
"engines": ["markdown"],
}

with (
make_quarto_source_bundle(temp_proj, inspect, AppModes.STATIC_QUARTO, None, [], [], None).bundle as bundle,
tarfile.open(mode="r:gz", fileobj=bundle) as tar,
):
with make_quarto_source_bundle(
temp_proj, inspect, AppModes.STATIC_QUARTO, None, [], [], None
).bundle as bundle, tarfile.open(mode="r:gz", fileobj=bundle) as tar:
names = sorted(tar.getnames())
self.assertEqual(
names,
Expand Down

0 comments on commit 06cb76b

Please sign in to comment.