Skip to content

Commit db2aa8f

Browse files
committed
chore(ruff): format with ruff 0.3.0
See also: https://github.com/astral-sh/ruff/blob/v0.3.0/CHANGELOG.md
1 parent 2b858e6 commit db2aa8f

35 files changed

+54
-38
lines changed

conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
See "pytest_plugins in non-top-level conftest files" in
88
https://docs.pytest.org/en/stable/deprecations.html
99
"""
10+
1011
import pathlib
1112
import typing as t
1213

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# flake8: NOQA: E501
22
"""Sphinx configuration for libvcs."""
3+
34
import inspect
45
import pathlib
56
import sys

src/libvcs/__about__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Metadata package for libvcs."""
2+
23
__title__ = "libvcs"
34
__package_name__ = "libvcs"
45
__description__ = "Lite, typed, python utilities for Git, SVN, Mercurial, etc."

src/libvcs/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Project package for libvcs."""
2+
23
import logging
34

45
from ._internal.run import CmdLoggingAdapter

src/libvcs/_internal/dataclasses.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
----
55
This is an internal API not covered by versioning policy.
66
"""
7+
78
import dataclasses
89
import typing as t
910
from operator import attrgetter

src/libvcs/_internal/query_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
----
55
This is an internal API not covered by versioning policy.
66
"""
7+
78
import re
89
import traceback
910
import typing as t

src/libvcs/_internal/run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
----
88
This is an internal API not covered by versioning policy.
99
"""
10+
1011
import datetime
1112
import logging
1213
import subprocess

src/libvcs/_internal/shortcuts.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
----
55
This is an internal API not covered by versioning policy.
66
"""
7+
78
import typing as t
89
from typing import Union
910

@@ -40,8 +41,7 @@ def create_project(
4041
vcs: t.Literal["git"],
4142
progress_callback: t.Optional[ProgressCallbackProtocol] = None,
4243
**kwargs: dict[t.Any, t.Any],
43-
) -> GitSync:
44-
...
44+
) -> GitSync: ...
4545

4646

4747
@t.overload
@@ -52,8 +52,7 @@ def create_project(
5252
vcs: t.Literal["svn"],
5353
progress_callback: t.Optional[ProgressCallbackProtocol] = None,
5454
**kwargs: dict[t.Any, t.Any],
55-
) -> SvnSync:
56-
...
55+
) -> SvnSync: ...
5756

5857

5958
@t.overload
@@ -64,8 +63,7 @@ def create_project(
6463
vcs: t.Literal["hg"],
6564
progress_callback: t.Optional[ProgressCallbackProtocol] = ...,
6665
**kwargs: dict[t.Any, t.Any],
67-
) -> HgSync:
68-
...
66+
) -> HgSync: ...
6967

7068

7169
def create_project(

src/libvcs/_internal/subprocess.py

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
>>> cmd.run(capture_output=True, universal_newlines=True).stdout
3939
'hello\n'
4040
"""
41+
4142
import dataclasses
4243
import subprocess
4344
import sys
@@ -223,8 +224,7 @@ def Popen(
223224
text: Optional[bool] = ...,
224225
encoding: str,
225226
errors: Optional[str] = ...,
226-
) -> subprocess.Popen[str]:
227-
...
227+
) -> subprocess.Popen[str]: ...
228228

229229
@overload
230230
def Popen(
@@ -235,8 +235,7 @@ def Popen(
235235
text: Optional[bool] = ...,
236236
encoding: Optional[str] = ...,
237237
errors: str,
238-
) -> subprocess.Popen[str]:
239-
...
238+
) -> subprocess.Popen[str]: ...
240239

241240
@overload
242241
def Popen(
@@ -248,8 +247,7 @@ def Popen(
248247
text: Optional[bool] = ...,
249248
encoding: Optional[str] = ...,
250249
errors: Optional[str] = ...,
251-
) -> subprocess.Popen[str]:
252-
...
250+
) -> subprocess.Popen[str]: ...
253251

254252
@overload
255253
def Popen(
@@ -260,8 +258,7 @@ def Popen(
260258
text: Literal[True],
261259
encoding: Optional[str] = ...,
262260
errors: Optional[str] = ...,
263-
) -> subprocess.Popen[str]:
264-
...
261+
) -> subprocess.Popen[str]: ...
265262

266263
@overload
267264
def Popen(
@@ -272,8 +269,7 @@ def Popen(
272269
text: Literal[None, False] = ...,
273270
encoding: None = ...,
274271
errors: None = ...,
275-
) -> subprocess.Popen[bytes]:
276-
...
272+
) -> subprocess.Popen[bytes]: ...
277273

278274
def Popen(
279275
self,
@@ -336,8 +332,7 @@ def check_output(
336332
errors: Optional[str] = ...,
337333
text: Literal[True],
338334
**kwargs: Any,
339-
) -> str:
340-
...
335+
) -> str: ...
341336

342337
@overload
343338
def check_output(
@@ -349,8 +344,7 @@ def check_output(
349344
errors: Optional[str] = ...,
350345
text: Optional[bool] = ...,
351346
**kwargs: Any,
352-
) -> str:
353-
...
347+
) -> str: ...
354348

355349
@overload
356350
def check_output(
@@ -362,8 +356,7 @@ def check_output(
362356
errors: str,
363357
text: Optional[bool] = ...,
364358
**kwargs: Any,
365-
) -> str:
366-
...
359+
) -> str: ...
367360

368361
@overload
369362
def check_output(
@@ -375,8 +368,7 @@ def check_output(
375368
errors: Optional[str] = ...,
376369
text: Optional[bool] = ...,
377370
**kwargs: Any,
378-
) -> str:
379-
...
371+
) -> str: ...
380372

381373
@overload
382374
def check_output(
@@ -388,8 +380,7 @@ def check_output(
388380
errors: None = ...,
389381
text: Literal[None, False] = ...,
390382
**kwargs: Any,
391-
) -> bytes:
392-
...
383+
) -> bytes: ...
393384

394385
def check_output(
395386
self,
@@ -449,8 +440,7 @@ def run(
449440
errors: Optional[str] = ...,
450441
input: Optional[str] = ...,
451442
text: Literal[True],
452-
) -> subprocess.CompletedProcess[str]:
453-
...
443+
) -> subprocess.CompletedProcess[str]: ...
454444

455445
@overload
456446
def run(
@@ -463,8 +453,7 @@ def run(
463453
errors: Optional[str] = ...,
464454
input: Optional[str] = ...,
465455
text: Optional[bool] = ...,
466-
) -> subprocess.CompletedProcess[str]:
467-
...
456+
) -> subprocess.CompletedProcess[str]: ...
468457

469458
@overload
470459
def run(
@@ -477,8 +466,7 @@ def run(
477466
errors: str,
478467
input: Optional[str] = ...,
479468
text: Optional[bool] = ...,
480-
) -> subprocess.CompletedProcess[str]:
481-
...
469+
) -> subprocess.CompletedProcess[str]: ...
482470

483471
@overload
484472
def run(
@@ -492,8 +480,7 @@ def run(
492480
errors: Optional[str] = ...,
493481
input: Optional[str] = ...,
494482
text: Optional[bool] = ...,
495-
) -> subprocess.CompletedProcess[str]:
496-
...
483+
) -> subprocess.CompletedProcess[str]: ...
497484

498485
@overload
499486
def run(
@@ -506,8 +493,7 @@ def run(
506493
errors: None = ...,
507494
input: Optional[bytes] = ...,
508495
text: Literal[None, False] = ...,
509-
) -> subprocess.CompletedProcess[bytes]:
510-
...
496+
) -> subprocess.CompletedProcess[bytes]: ...
511497

512498
def run(
513499
self,

src/libvcs/_internal/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
77
.. _typeshed's: https://github.com/python/typeshed/blob/5df8de7/stdlib/_typeshed/__init__.pyi#L115-L118
88
""" # E501
9+
910
from os import PathLike
1011
from typing import TYPE_CHECKING, Literal, Union
1112

0 commit comments

Comments
 (0)