File tree Expand file tree Collapse file tree 4 files changed +18
-13
lines changed
tools/schemacode/src/bidsschematools Expand file tree Collapse file tree 4 files changed +18
-13
lines changed Original file line number Diff line number Diff line change 3333 with :
3434 fetch-depth : 0
3535 - name : Install the latest version of uv
36- uses : astral-sh/setup-uv@v6
36+ uses : astral-sh/setup-uv@v7
3737 if : ${{ startsWith(github.ref, 'refs/tags/schema-') }}
3838 - name : " Build archive on tag"
3939 run : |
6565 - uses : actions/checkout@v5
6666
6767 - name : Set up Python ${{ matrix.python-version }} (uv)
68- uses : astral-sh/setup-uv@v6
68+ uses : astral-sh/setup-uv@v7
6969 with :
7070 python-version : ${{ matrix.python-version }}
7171 activate-environment : true
Original file line number Diff line number Diff line change 3737 runs-on : ubuntu-latest
3838 steps :
3939 - uses : actions/checkout@v5
40- - uses : astral-sh/setup-uv@v6
40+ - uses : astral-sh/setup-uv@v7
4141 - name : Lint yml files in src/schema
4242 run : uvx yamllint -f standard src/schema/ -c .yamllint.yml
4343
4646 runs-on : ubuntu-latest
4747 steps :
4848 - uses : actions/checkout@v5
49- - uses : astral-sh/setup-uv@v6
49+ - uses : astral-sh/setup-uv@v7
5050 - run : uvx ruff format --diff
5151 - run : uvx ruff check
5252
5555 runs-on : ubuntu-latest
5656 steps :
5757 - uses : actions/checkout@v5
58- - uses : astral-sh/setup-uv@v6
58+ - uses : astral-sh/setup-uv@v7
5959 - name : Check for Latin phrases
6060 run : uv run tools/no-bad-latin.py
6161
6464 runs-on : ubuntu-latest
6565 steps :
6666 - uses : actions/checkout@v5
67- - uses : astral-sh/setup-uv@v6
67+ - uses : astral-sh/setup-uv@v7
6868 - name : Validate CITATION.cff
6969 run : uvx cffconvert --validate
7070 - name : Check for Zenodo compatibility
Original file line number Diff line number Diff line change 77from markdown_it import MarkdownIt
88from tabulate import tabulate
99
10- from ..utils import filter_warnings , in_context
10+ from ..utils import WarningsFilter , in_context
1111from .utils import propagate_fence_exception
1212
1313
14- @in_context (filter_warnings (["error" ]))
1514@propagate_fence_exception
15+ @in_context (WarningsFilter (["error" ]))
1616def fence (
1717 source : str ,
1818 language : str ,
Original file line number Diff line number Diff line change @@ -179,14 +179,19 @@ def wrapper(*args, **kwargs):
179179 return decorator
180180
181181
182- @contextmanager
183- def filter_warnings (* filters ):
182+ class WarningsFilter :
184183 """Context manager to apply warning filters.
185184
186185 Arguments are lists of positional arguments to :func:`warnings.filterwarnings`.
187186 """
187+ def __init__ (self , * filters ):
188+ self .filters = filters
188189
189- with warnings .catch_warnings ():
190- for filt in filters :
190+ def __enter__ (self ):
191+ self .catcher = warnings .catch_warnings ()
192+ self .catcher .__enter__ ()
193+ for filt in self .filters :
191194 warnings .filterwarnings (* filt )
192- yield
195+
196+ def __exit__ (self , exc_type , exc_value , traceback ):
197+ self .catcher .__exit__ (exc_type , exc_value , traceback )
You can’t perform that action at this time.
0 commit comments