MCPcopy Index your code
hub / github.com/python/mypy / copy_modified

Method copy_modified

mypy/types.py:818–837  ·  view source on GitHub ↗
(
        self,
        *,
        id: Bogus[TypeVarId] = _dummy,
        flavor: int = _dummy_int,
        prefix: Bogus[Parameters] = _dummy,
        default: Bogus[Type] = _dummy,
        **kwargs: Any,
    )

Source from the content-addressed store, hash-verified

816 )
817
818 def copy_modified(
819 self,
820 *,
821 id: Bogus[TypeVarId] = _dummy,
822 flavor: int = _dummy_int,
823 prefix: Bogus[Parameters] = _dummy,
824 default: Bogus[Type] = _dummy,
825 **kwargs: Any,
826 ) -> ParamSpecType:
827 return ParamSpecType(
828 self.name,
829 self.fullname,
830 id if id is not _dummy else self.id,
831 flavor if flavor != _dummy_int else self.flavor,
832 self.upper_bound,
833 default=default if default is not _dummy else self.default,
834 line=self.line,
835 column=self.column,
836 prefix=prefix if prefix is not _dummy else self.prefix,
837 )
838
839 def accept(self, visitor: TypeVisitor[T]) -> T:
840 return visitor.visit_param_spec(self)

Callers 1

fill_typevarsFunction · 0.95

Calls 1

ParamSpecTypeClass · 0.85

Tested by

no test coverage detected