class_docstr: A reader of fixed-width lines.
code: def __init__(
      self,
      f: IO[str] | ReadCsvBuffer[str],
      colspecs: list[tuple[int, int]] | Literal["infer"],
      delimiter: str | None,
      comment: str | None,
      skiprows: set[int] | None = None,
      infer_nrows: int = 100,
  ) -> None:
      self.f = f
      self.buffer: Iterator | None = None
      self.delimiter = "\r\n" + delimiter if delimiter else "\n\r\t "
      self.comment = comment
      if colspecs == "infer":
          self.colspecs = self.detect_colspecs(
              infer_nrows=infer_nrows, skiprows=skiprows
          )
      else:
          self.colspecs = colspecs
  
      if not isinstance(self.colspecs, (tuple, list)):
          raise TypeError(
              "column specifications must be a list or tuple, "
              f"input was a {type(colspecs).__name__}"
          )
  
      for colspec in self.colspecs:
          if not (
              isinstance(colspec, (tuple, list))
              and len(colspec) == 2
              and isinstance(colspec[0], (int, np.integer, type(None)))
              and isinstance(colspec[1], (int, np.integer, type(None)))
          ):
              raise TypeError(
                  "Each column specification must be "
                  "2 element tuple or list of integers"
              )
  
imports: from __future__ import annotations
  from collections import abc, defaultdict
  import csv
  from io import StringIO
  import re
  from typing import IO, TYPE_CHECKING, DefaultDict, Literal, cast
  import warnings
  import numpy
  from pandas._libs import lib
  from pandas.errors import EmptyDataError, ParserError, ParserWarning
  from pandas.util._decorators import cache_readonly
  from pandas.util._exceptions import find_stack_level
  from pandas.core.dtypes.common import is_bool_dtype, is_integer, is_numeric_dtype
  from pandas.core.dtypes.inference import is_dict_like
  from pandas.io.common import dedup_names, is_potential_multi_index
  from pandas.io.parsers.base_parser import ParserBase, parser_defaults
label_desc: Use image node_id 1 to create a new FixedWidthReader object from inherited base classes: abc with example: obj = FixedWidthReader(f, colspecs, delimiter, comment, skiprows, infer_nrows)