Commit 5204a6f9 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

MNT: fix typing

parent 0163b7ca
......@@ -15,10 +15,11 @@ import fnmatch
import logging
import collections
from typing import Sequence, Union
from typing import Sequence, Union, Optional, Tuple
import pandas as pd
import funpack.fileinfo as finfo
import funpack.expression as expression
import funpack.loadtables as loadtables
......@@ -38,7 +39,7 @@ def _ispattern(s):
"""Returns ``True`` if ``s`` looks like a ``fnmatch``-style pattern,
``False`` otherwise.
"""
return any([c in s for c in '*?['])
return any(c in s for c in '*?[')
def restrictVariables(
......@@ -47,8 +48,7 @@ def restrictVariables(
categories : Sequence[Union[str, int]] = None,
excludeVariables : Sequence[int] = None,
excludeCategories : Sequence[Union[str, int]] = None
) -> Union[None, Sequence[int]]:
) -> Tuple[Optional[Sequence[int]], Optional[Sequence[int]]]:
"""Determines which variables should be loaded (and the order they should
appear in the output), and which variables should be excluded, from the
given sequences of ``variables``, ``categories``, and ``excludeVariables``
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment