scmrepo 3.3.9__py3-none-any.whl → 3.3.10__py3-none-any.whl

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.
scmrepo/fs.py CHANGED
@@ -3,9 +3,7 @@ import os
3
3
  import posixpath
4
4
  from typing import TYPE_CHECKING, Any, BinaryIO, Callable, Optional
5
5
 
6
- from fsspec.callbacks import _DEFAULT_CALLBACK
7
6
  from fsspec.spec import AbstractFileSystem
8
- from fsspec.utils import isfilelike
9
7
 
10
8
  if TYPE_CHECKING:
11
9
  from io import BytesIO
@@ -242,32 +240,3 @@ class GitFileSystem(AbstractFileSystem):
242
240
  return paths
243
241
 
244
242
  return [self.info(_path) for _path in paths]
245
-
246
- def get_file(
247
- self, rpath, lpath, callback=_DEFAULT_CALLBACK, outfile=None, **kwargs
248
- ):
249
- # NOTE: temporary workaround while waiting for
250
- # https://github.com/fsspec/filesystem_spec/pull/1191
251
-
252
- if isfilelike(lpath):
253
- outfile = lpath
254
- elif self.isdir(rpath):
255
- os.makedirs(lpath, exist_ok=True)
256
- return None
257
-
258
- with self.open(rpath, "rb", **kwargs) as f1:
259
- if outfile is None:
260
- outfile = open(lpath, "wb") # noqa: SIM115
261
-
262
- try:
263
- callback.set_size(getattr(f1, "size", None))
264
- data = True
265
- while data:
266
- data = f1.read(self.blocksize)
267
- segment_len = outfile.write(data)
268
- if segment_len is None:
269
- segment_len = len(data)
270
- callback.relative_update(segment_len)
271
- finally:
272
- if not isfilelike(lpath):
273
- outfile.close()
scmrepo/git/__init__.py CHANGED
@@ -258,7 +258,7 @@ class Git(Base):
258
258
  self.hooks_dir.mkdir(exist_ok=True)
259
259
  hook = self.hooks_dir / name
260
260
 
261
- directive = f"#!{shutil.which(interpreter) or '/bin/sh' }"
261
+ directive = f"#!{shutil.which(interpreter) or '/bin/sh'}"
262
262
  hook.write_text(f"{directive}\n{script}\n", encoding="utf-8")
263
263
  hook.chmod(0o777)
264
264
 
@@ -287,7 +287,7 @@ class Git(Base):
287
287
  def no_commits(self):
288
288
  return not bool(self.get_ref("HEAD"))
289
289
 
290
- # Prefer re-using the most recently used backend when possible. When
290
+ # Prefer reusing the most recently used backend when possible. When
291
291
  # changing backends (due to unimplemented calls), we close the previous
292
292
  # backend to release any open git files/contexts that may cause conflicts
293
293
  # with the new backend.
@@ -184,7 +184,7 @@ class GitPythonBackend(BaseGitBackend): # pylint:disable=abstract-method
184
184
  # In fix_env, we delete LD_LIBRARY_PATH key if it was empty before
185
185
  # PyInstaller modified it. GitPython, in git.Repo.clone_from, uses
186
186
  # env to update its own internal state. When there is no key in
187
- # env, this value is not updated and GitPython re-uses
187
+ # env, this value is not updated and GitPython reuses
188
188
  # LD_LIBRARY_PATH that has been set by PyInstaller.
189
189
  # See [1] for more info.
190
190
  # [1] https://github.com/gitpython-developers/GitPython/issues/924
@@ -720,7 +720,7 @@ class Pygit2Backend(BaseGitBackend): # pylint:disable=abstract-method
720
720
  for refname in remote_refs:
721
721
  if fnmatch.fnmatch(refname, lh):
722
722
  src = refname
723
- dst = f"{rh_prefix}{refname[len(lh_prefix):]}"
723
+ dst = f"{rh_prefix}{refname[len(lh_prefix) :]}"
724
724
  result[dst] = cb.result.get(
725
725
  src, _default_status(src, dst, remote_refs)
726
726
  )
@@ -324,7 +324,7 @@ def _input_tty(prompt: str = "Username: ") -> str:
324
324
  try:
325
325
  fd = os.open(
326
326
  "/dev/tty",
327
- os.O_RDWR | os.O_NOCTTY, # pylint: disable=no-member
327
+ os.O_RDWR | os.O_NOCTTY, # type: ignore[attr-defined]
328
328
  )
329
329
  tty = io.FileIO(fd, "w+")
330
330
  stack.enter_context(tty)
scmrepo/git/lfs/fetch.py CHANGED
@@ -122,7 +122,7 @@ def _collect_objects(
122
122
  and (result := _ROOT_PATH_PREFIX_REGEX.match(path := include[0]))
123
123
  ):
124
124
  root = result.group("prefix")
125
- if path in {root, f'{root.rstrip("/")}/**'}:
125
+ if path in {root, f"{root.rstrip('/')}/**"}:
126
126
  include = []
127
127
  else:
128
128
  root = "/"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: scmrepo
3
- Version: 3.3.9
3
+ Version: 3.3.10
4
4
  Summary: scmrepo
5
5
  Author-email: Iterative <support@dvc.org>
6
6
  License: Apache-2.0
@@ -38,7 +38,7 @@ Requires-Dist: pytest-sugar; extra == "tests"
38
38
  Requires-Dist: pytest-test-utils<0.2,>=0.1.0; extra == "tests"
39
39
  Requires-Dist: proxy.py; extra == "tests"
40
40
  Provides-Extra: dev
41
- Requires-Dist: mypy==1.13.0; extra == "dev"
41
+ Requires-Dist: mypy==1.14.1; extra == "dev"
42
42
  Requires-Dist: scmrepo[tests]; extra == "dev"
43
43
  Requires-Dist: types-certifi; extra == "dev"
44
44
  Requires-Dist: types-mock; extra == "dev"
@@ -2,37 +2,37 @@ scmrepo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  scmrepo/asyn.py,sha256=eckXZkVngwbNNyO04eAJUZxsTy7kvsdz0TUGaWpJpf0,1524
3
3
  scmrepo/base.py,sha256=pgddGR7UeZoEq2d5lip1vjbxTmpwTnKFH4JwHy-Fmho,3007
4
4
  scmrepo/exceptions.py,sha256=vR8BuCKgKh9lMnCemzNYGHiJctioOmhn_Kv5m8XO69Y,1053
5
- scmrepo/fs.py,sha256=ARD8_TRSdHpuiaYwF7QXrQIyfl9AFj7ctv_Ltc6pAAs,7740
5
+ scmrepo/fs.py,sha256=8efNf_D5IQb-N42w-apAkG3Uwe8gJA_HVflniY9gX6M,6639
6
6
  scmrepo/noscm.py,sha256=xraqlBek4zhFlHf1LvTMkgBM0hykgcTfMVkTNCpVlcQ,491
7
7
  scmrepo/progress.py,sha256=fRUMvkcw6GLuVTP_tK7mGpKeJjbJulFP8rPUqyltkYQ,2157
8
8
  scmrepo/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  scmrepo/urls.py,sha256=vEfW1h1lb7GXvMVBk-TNwqctpl-5xGMA2LbOPVn7t4Q,638
10
10
  scmrepo/utils.py,sha256=_F3rVvPhES-A2JxLGob0RV8BOnHzxbA9aDPClA7_V8M,1512
11
- scmrepo/git/__init__.py,sha256=6giWgQpgAlJslOkFmSAYkw8pb7nuefrbpZZf5Np3Iyo,17189
11
+ scmrepo/git/__init__.py,sha256=elQErQSqekg-XWfxjNmEV0X00xtvy0LDFvy9nmv71Ls,17187
12
12
  scmrepo/git/config.py,sha256=0t0OBmJ9SIa5tf22QdcGzhZfdMzzppvEmceUDg8ZPyE,943
13
- scmrepo/git/credentials.py,sha256=VYk16-KHHD_JMVEeVsWI1ZKp8DUaGi8_GDxB-Fjby6g,22311
13
+ scmrepo/git/credentials.py,sha256=tn8TlyCJUz8HOF7eL6F5Yj4n9vREsFwXrjLU1isi13s,22312
14
14
  scmrepo/git/objects.py,sha256=vqeFpUlMFHL9Yv1h3wTA7mbRWHCVC_4KgLy5aAISD2g,4674
15
15
  scmrepo/git/stash.py,sha256=wKWnYj_xpdT_3pvHiXtE7_I_By4S-Zbxf4Lv-ZY2sxI,2785
16
16
  scmrepo/git/backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  scmrepo/git/backend/base.py,sha256=nVMkUIeSVu-ZLCd2QPxMfTgrjnTOejM1UET9R7qKJRc,13560
18
- scmrepo/git/backend/gitpython.py,sha256=k2MHg1sHZRFNzfQir3IlTpxrQHieflKwwHtnjzlPXZU,25341
18
+ scmrepo/git/backend/gitpython.py,sha256=myfZY2x27DbDvIBUXzDjswXEViR5MKH0qgowwzcn7aY,25340
19
19
  scmrepo/git/backend/dulwich/__init__.py,sha256=7UJJyEPqgc2tfPs1WN_XdvRkMsGyFA1HVgTf7mrgLNE,35098
20
20
  scmrepo/git/backend/dulwich/asyncssh_vendor.py,sha256=clqsPC9ayulwgb5VLp-69hEbN9XMPvjh_0diBlH4wv4,11520
21
21
  scmrepo/git/backend/dulwich/client.py,sha256=XjNBfOp0L8M3iPpqcX_4bmXsO7hwrkyqg5wMbZULD-I,2358
22
- scmrepo/git/backend/pygit2/__init__.py,sha256=Is9OjsiDdUTRBUYrG1qoK5AP6Cjcy2tAk71nsmkzLf4,36316
22
+ scmrepo/git/backend/pygit2/__init__.py,sha256=pj9Naxq38JxjI0Aujknamqy4SV4g0Vy0tYN5kcuRbaU,36317
23
23
  scmrepo/git/backend/pygit2/callbacks.py,sha256=BFIFMzUpSC-CtNY50yTqksAusASgidzsQrG-B-Ry2lw,2749
24
24
  scmrepo/git/backend/pygit2/filter.py,sha256=8Ibn_2oXM32YRpyovxGKYhtPZLUYTBLDi9--bScOP00,2198
25
25
  scmrepo/git/lfs/__init__.py,sha256=at5blRIKnKpg_g5dLRDsGWBFi6SbucRlF_DX6aAkGtE,257
26
26
  scmrepo/git/lfs/client.py,sha256=64u5lJijUASNJ4H_Eg7aEb8j3z3eluuNUWGnYvfNnvo,10187
27
27
  scmrepo/git/lfs/exceptions.py,sha256=cLlImmPXWJJUl44S4xcRBa2T9wYRkWTaKQGwJylwOhA,77
28
- scmrepo/git/lfs/fetch.py,sha256=45JGAKHAdANShZ9XEVXq0EYuKBgGmlMK2TX8z9Og8wg,5530
28
+ scmrepo/git/lfs/fetch.py,sha256=YynrODVZWYTfnqOmLOBHjXZQ6sf_lnyDuJHttSl3TOU,5530
29
29
  scmrepo/git/lfs/object.py,sha256=rAYY_z9EYoHPfbpF1QHwL7ecYgaETPyCl-zBx0E1oIQ,337
30
30
  scmrepo/git/lfs/pointer.py,sha256=BcVbtjoOUG9cEzyJSJDeweqehGZvq43P6NNLDYUGYEI,3181
31
31
  scmrepo/git/lfs/progress.py,sha256=AcWvygDG0ee__Jec5BlRr58F-lAj3d4Z_j7JbW3OUcI,4733
32
32
  scmrepo/git/lfs/smudge.py,sha256=1O_fznptWo4CKXqcJgUoWP6cgWWhvGAZ3d87kasG3cQ,1610
33
33
  scmrepo/git/lfs/storage.py,sha256=nx_HvHHC1sf15Qgbsj8jEOkdHXkZ8VUEh8QBtt9sLwI,2348
34
- scmrepo-3.3.9.dist-info/LICENSE,sha256=-1jhbPjoIVHR0cEgahL4Zhct75Ff4MzYCR_jOaJDPq8,11340
35
- scmrepo-3.3.9.dist-info/METADATA,sha256=rTixvRBdWMPNf_op8TVliMDccLarhPf4_hTMRaZNMcE,4792
36
- scmrepo-3.3.9.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
37
- scmrepo-3.3.9.dist-info/top_level.txt,sha256=iunjod6w3GogERsAYfLRupnANXnqzX3jbIfbeIQG5cc,8
38
- scmrepo-3.3.9.dist-info/RECORD,,
34
+ scmrepo-3.3.10.dist-info/LICENSE,sha256=-1jhbPjoIVHR0cEgahL4Zhct75Ff4MzYCR_jOaJDPq8,11340
35
+ scmrepo-3.3.10.dist-info/METADATA,sha256=gUXgbfV8ouHPqtPHzpNQsJzPZPs5e4_yUwqBbj7ZoTU,4793
36
+ scmrepo-3.3.10.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
37
+ scmrepo-3.3.10.dist-info/top_level.txt,sha256=iunjod6w3GogERsAYfLRupnANXnqzX3jbIfbeIQG5cc,8
38
+ scmrepo-3.3.10.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5