Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: exception traceback is too big #191

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Apr 3, 2024

See astropy/astropy#16253.

New traceback:

╭──────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────────────────────╮
│ /Users/henryschreiner/git/scikit-hep/cookie/.venv/bin/repo-review:8 in <module>                                                                    │
│                                                                                                                                                    │
│   5 from repo_review.__main__ import main                                                                                                          │
│   6 if __name__ == '__main__':                                                                                                                     │
│   7 │   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])                                                                           │
│ ❱ 8 │   sys.exit(main())                                                                                                                           │
│   9                                                                                                                                                │
│                                                                                                                                                    │
│ /Users/henryschreiner/git/scikit-hep/cookie/.venv/lib/python3.12/site-packages/click/core.py:1157 in __call__                                      │
│                                                                                                                                                    │
│ /Users/henryschreiner/git/scikit-hep/cookie/.venv/lib/python3.12/site-packages/rich_click/rich_command.py:126 in main                              │
│                                                                                                                                                    │
│ /Users/henryschreiner/git/scikit-hep/cookie/.venv/lib/python3.12/site-packages/click/core.py:1434 in invoke                                        │
│                                                                                                                                                    │
│ /Users/henryschreiner/git/scikit-hep/cookie/.venv/lib/python3.12/site-packages/click/core.py:783 in invoke                                         │
│                                                                                                                                                    │
│ /Users/henryschreiner/git/scikit-hep/repo-review/src/repo_review/__main__.py:299 in main                                                           │
│                                                                                                                                                    │
│   296 │                                                                                                                                            │
│   297 │   result = 0                                                                                                                               │
│   298 │   for n, package in enumerate(packages):                                                                                                   │
│ ❱ 299 │   │   result |= on_each(                                                                                                                   │
│   300 │   │   │   package,                                                                                                                         │
│   301 │   │   │   format_opt,                                                                                                                      │
│   302 │   │   │   stderr_fmt,                                                                                                                      │
│                                                                                                                                                    │
│ /Users/henryschreiner/git/scikit-hep/repo-review/src/repo_review/__main__.py:360 in on_each                                                        │
│                                                                                                                                                    │
│   357 │   │   base_package = package                                                                                                               │
│   358 │   │   header = package.name                                                                                                                │
│   359 │                                                                                                                                            │
│ ❱ 360 │   families, processed = process(                                                                                                           │
│   361 │   │   base_package, select=select_list, ignore=ignore_list, subdir=package_dir                                                             │
│   362 │   )                                                                                                                                        │
│   363                                                                                                                                              │
│                                                                                                                                                    │
│ /Users/henryschreiner/git/scikit-hep/repo-review/src/repo_review/processor.py:213 in process                                                       │
│                                                                                                                                                    │
│   210 │   ts = graphlib.TopologicalSorter(graph)                                                                                                   │
│   211 │   for name in ts.static_order():                                                                                                           │
│   212 │   │   if all(completed.get(n, "") == "" for n in graph[name]):                                                                             │
│ ❱ 213 │   │   │   result = apply_fixtures({"name": name, **fixtures}, tasks[name].check)                                                           │
│   214 │   │   │   if isinstance(result, bool):                                                                                                     │
│   215 │   │   │   │   completed[name] = (                                                                                                          │
│   216 │   │   │   │   │   ""                                                                                                                       │
│                                                                                                                                                    │
│ /Users/henryschreiner/git/scikit-hep/repo-review/src/repo_review/fixtures.py:106 in apply_fixtures                                                 │
│                                                                                                                                                    │
│   103 │   kwargs = {                                                                                                                               │
│   104 │   │   name: value for name, value in fixtures.items() if name in signature.parameters                                                      │
│   105 │   }                                                                                                                                        │
│ ❱ 106 │   return func(**kwargs)                                                                                                                    │
│   107                                                                                                                                              │
│   108                                                                                                                                              │
│   109 def collect_fixtures() -> dict[str, Callable[[Traversable], Any]]:                                                                           │
│                                                                                                                                                    │
│ /Users/henryschreiner/git/scikit-hep/cookie/src/sp_repo_review/checks/pyproject.py:92 in check                                                     │
│                                                                                                                                                    │
│    89 │   │   ```                                                                                                                                  │
│    90 │   │   """                                                                                                                                  │
│    91 │   │   options = pyproject["tool"]["pytest"]["ini_options"]                                                                                 │
│ ❱  92 │   │   return "minversion" in options and int(options["minversion"].split(".")[0]) >= 6                                                     │
│    93                                                                                                                                              │
│    94                                                                                                                                              │
│    95 class PP303(PyProject):                                                                                                                      │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'float' object has no attribute 'split'

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii merged commit 69f41da into main Apr 4, 2024
15 checks passed
@henryiii henryiii deleted the henryiii/fix/bigexcept branch April 4, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant