repo-review 0.12.2__py3-none-any.whl → 0.12.3__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.
repo_review/__main__.py CHANGED
@@ -1,5 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import functools
3
4
  import importlib.metadata
4
5
  import itertools
5
6
  import json
@@ -100,16 +101,8 @@ def all_versions(ctx: click.Context, _param: click.Parameter, value: bool) -> No
100
101
  ctx.exit()
101
102
 
102
103
 
103
- def rich_printer(
104
- families: Mapping[str, Family],
105
- processed: list[Result],
106
- *,
107
- svg: bool = False,
108
- stderr: bool = False,
109
- color: bool = True,
110
- status: Status,
111
- header: str = "",
112
- ) -> None:
104
+ @functools.cache
105
+ def _ensure_unicode_streams() -> None:
113
106
  # Before Python 3.15, this isn't always unicode
114
107
  if (
115
108
  sys.version_info < (3, 15)
@@ -121,6 +114,19 @@ def rich_printer(
121
114
  if sys.stderr.encoding != "utf-8":
122
115
  sys.stderr.reconfigure(encoding="utf-8") # type: ignore[union-attr]
123
116
 
117
+
118
+ def rich_printer(
119
+ families: Mapping[str, Family],
120
+ processed: list[Result],
121
+ *,
122
+ svg: bool = False,
123
+ stderr: bool = False,
124
+ color: bool = True,
125
+ status: Status,
126
+ header: str = "",
127
+ ) -> None:
128
+ _ensure_unicode_streams()
129
+
124
130
  console = rich.console.Console(
125
131
  record=svg, quiet=svg, stderr=stderr, color_system="auto" if color else None
126
132
  )
@@ -275,7 +281,15 @@ def _remote_path_processor(package: Path) -> Path | GHPath:
275
281
  raise SystemExit(1) from None
276
282
 
277
283
 
278
- @click.command(context_settings={"help_option_names": ["-h", "--help"]})
284
+ class UnicodeHelpCommand(click.Command):
285
+ def get_help(self, ctx: click.Context) -> str:
286
+ _ensure_unicode_streams()
287
+ return super().get_help(ctx)
288
+
289
+
290
+ @click.command(
291
+ cls=UnicodeHelpCommand, context_settings={"help_option_names": ["-h", "--help"]}
292
+ )
279
293
  @click.version_option(version=__version__)
280
294
  @click.argument(
281
295
  "packages",
repo_review/_version.py CHANGED
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '0.12.2'
21
- __version_tuple__ = version_tuple = (0, 12, 2)
31
+ __version__ = version = '0.12.3'
32
+ __version_tuple__ = version_tuple = (0, 12, 3)
33
+
34
+ __commit_id__ = commit_id = None
repo_review/ghpath.py CHANGED
@@ -50,11 +50,11 @@ class GHPath(Traversable):
50
50
  def open_url(url: str) -> io.StringIO:
51
51
  "This method can be overridden manually for WASM. Supports pyodide currently."
52
52
  if sys.platform == "emscripten":
53
- import pyodide.http
53
+ import pyodide.http # noqa: PLC0415
54
54
 
55
55
  return pyodide.http.open_url(url)
56
56
 
57
- import urllib.request # pylint: disable=import-outside-toplevel
57
+ import urllib.request # noqa: PLC0415
58
58
 
59
59
  with urllib.request.urlopen(url) as response:
60
60
  return io.StringIO(response.read().decode("utf-8"))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: repo_review
3
- Version: 0.12.2
3
+ Version: 0.12.3
4
4
  Summary: Framework that can run checks on repos
5
5
  Project-URL: Changelog, https://github.com/scientific-python/repo-review/releases
6
6
  Project-URL: Demo, https://scientific-python.github.io/repo-review
@@ -1,11 +1,11 @@
1
1
  repo_review/__init__.py,sha256=U03wTpj7PjSsIROp8O4VRG_NVG-plkx14d_MvqpmJ_w,229
2
- repo_review/__main__.py,sha256=oiwA_FGD-ogrflMyWt2wAoy_vlNqdIc7qN2zZjSPq0c,15117
3
- repo_review/_version.py,sha256=zZwBOgFsGuwXoMQE3ufj9-wsWZuT7V5jwWvKP04rOSE,513
2
+ repo_review/__main__.py,sha256=jRu9323aVS-DH8ZHQXyF9afmtzt8gR6eLlNRnQRLjHA,15417
3
+ repo_review/_version.py,sha256=aQhQAWQK7Ayv_Drz5sUrTnuy21gUTxHx0OdXaQ7uUfY,706
4
4
  repo_review/_version.pyi,sha256=j5kbzfm6lOn8BzASXWjGIA1yT0OlHTWqlbyZ8Si_o0E,118
5
5
  repo_review/checks.py,sha256=Iz5T1d0wDfBIyaO3f5waHEqhmfP_4-9eNOngJpRnpGo,4845
6
6
  repo_review/families.py,sha256=TEMQY3whMj8b3iVlWyVsTa0CAZexXRCFXq5uPIkV6bs,2389
7
7
  repo_review/fixtures.py,sha256=ypeEj-Ae3_3bUWUE0n-wuOrKlEVFU6rp7zK-UoC_t6E,3607
8
- repo_review/ghpath.py,sha256=fkzUD1G_kuzCmVhTH2yAJoJxxYwjAXfjnBwtaj6nqg0,6123
8
+ repo_review/ghpath.py,sha256=4J7CfPhlnvdv-LtSTWEmXxxoN1zfscC828iJUjKBSTM,6114
9
9
  repo_review/html.py,sha256=Mazyng90X31DTOk23ZKtIMwyN-LeHnwG7StwdySwMAA,3716
10
10
  repo_review/processor.py,sha256=Cfw65EGfFQosLh6g1jeghWR0xTIg0HRpXXJVsCpiqX0,9524
11
11
  repo_review/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -19,8 +19,8 @@ repo_review/_compat/importlib/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5J
19
19
  repo_review/_compat/importlib/resources/abc.py,sha256=KLv7AqUaY-ezZ32lA5yVcZLfMqY6VEo8Q-1jyWpGRbk,300
20
20
  repo_review/resources/__init__.py,sha256=RBBaUp-hQrIYBqbAT0MytCXEjDmqVsCjiEgdK_K3dN4,138
21
21
  repo_review/resources/repo-review.schema.json,sha256=jAc7ZQV-Hc16ENrNFZm7nlIjiRQGTanq8EjBICkJKpE,791
22
- repo_review-0.12.2.dist-info/METADATA,sha256=oo65FrIUnWRT6qyoRJzXJXgIhCQBE6pvt3t2GzvMp8A,10665
23
- repo_review-0.12.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
24
- repo_review-0.12.2.dist-info/entry_points.txt,sha256=9XaDWanm31NNpXOpjZh2HxSXR5owVdYJ2cbNG5D8wY8,244
25
- repo_review-0.12.2.dist-info/licenses/LICENSE,sha256=X7yOxzyAEckYl17p01lZzbraqDVmWEWXE8BnKKRrh7c,1525
26
- repo_review-0.12.2.dist-info/RECORD,,
22
+ repo_review-0.12.3.dist-info/METADATA,sha256=AxGI9mVQV_fi84ygvOKqio_-GRB5cztOtIXwox09QrY,10665
23
+ repo_review-0.12.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
24
+ repo_review-0.12.3.dist-info/entry_points.txt,sha256=9XaDWanm31NNpXOpjZh2HxSXR5owVdYJ2cbNG5D8wY8,244
25
+ repo_review-0.12.3.dist-info/licenses/LICENSE,sha256=X7yOxzyAEckYl17p01lZzbraqDVmWEWXE8BnKKRrh7c,1525
26
+ repo_review-0.12.3.dist-info/RECORD,,