class_docstr: The :class:`PathSpec` class is a wrapper around a list of compiled
  :class:`.Pattern` instances.
class_docstr_tok: ["The",":","class",":","`","PathSpec","`","class","is","a","wrapper","around","a","list","of","compiled",":","class",":","`",".Pattern","`","instances","."]
docstr: Initializes the :class:`PathSpec` instance.
  
  *patterns* (:class:`~collections.abc.Collection` or :class:`~collections.abc.Iterable`)
  yields each compiled pattern (:class:`.Pattern`).
docstr_tok: ["Initializes","the",":","class",":","`","PathSpec","`","instance",".","*","patterns","*","(",":","class",":","`","~collections.abc.Collection","`","or",":","class",":","`","~collections.abc.Iterable","`",")","yields","each","compiled","pattern","(",":","class",":","`",".Pattern","`",")","."]
code: def __init__(self, patterns: Iterable[Pattern]) -> None:
      """
      Initializes the :class:`PathSpec` instance.
  
      *patterns* (:class:`~collections.abc.Collection` or :class:`~collections.abc.Iterable`)
      yields each compiled pattern (:class:`.Pattern`).
      """
      if not isinstance(patterns, CollectionType):
          patterns = list(patterns)
  
      self.patterns: Collection[Pattern] = patterns
      """
  		*patterns* (:class:`~collections.abc.Collection` of :class:`.Pattern`)
  		contains the compiled patterns.
  		"""
  
imports: from collections.abc import Collection
  from itertools import zip_longest
  from typing import AnyStr, Callable, Collection, Iterable, Iterator, Optional, Type, TypeVar, Union
  from .None import util
  from .pattern import Pattern
  from .util import CheckResult, StrPath, TStrPath, TreeEntry, _filter_check_patterns, _is_iterable, normalize_file
label_desc: Use image node_id 1 to create a new PathSpec object from inherited base classes: object with example: obj = PathSpec(patterns)