code-battles-cli 1.1.1__tar.gz → 1.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: code-battles-cli
3
- Version: 1.1.1
3
+ Version: 1.1.2
4
4
  Summary: A CLI for competitors in any Code Battles event!
5
5
  Requires-Python: >=3.8
6
6
  Requires-Dist: click>=8.1.7
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "code-battles-cli"
3
- version = "1.1.1"
3
+ version = "1.1.2"
4
4
  description = "A CLI for competitors in any Code Battles event!"
5
5
  dependencies = [
6
6
  "requests>=2.32.3",
@@ -197,9 +197,14 @@ class Client:
197
197
  self.document.set(bots, merge)
198
198
 
199
199
  def _possibly_download(self, force_download=False):
200
- code_directory = os.path.expanduser(
201
- f"~/.cache/code-battles/{''.join([c for c in self.url.removeprefix("https").removesuffix(".web.app") if c.isalnum()])}"
200
+ directory_name = "".join(
201
+ [
202
+ c
203
+ for c in self.url.removeprefix("https").removesuffix(".web.app")
204
+ if c.isalnum()
205
+ ]
202
206
  )
207
+ code_directory = os.path.expanduser(f"~/.cache/code-battles/{directory_name}")
203
208
 
204
209
  if force_download and os.path.exists(code_directory):
205
210
  shutil.rmtree(code_directory)