Skip to content

Commit

Permalink
chore(Type Bindings): Generate updated bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Jan 21, 2020
1 parent 8812e01 commit e62ea86
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
40 changes: 20 additions & 20 deletions py/stencila/schema/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,16 @@ def __init__(
class CodeBlock(Code):
"""A code block."""

export: Optional[str] = None
import: Optional[str] = None
exportFrom: Optional[str] = None
importTo: Optional[str] = None

def __init__(
self,
text: str,
export: Optional[str] = None,
exportFrom: Optional[str] = None,
format: Optional[str] = None,
id: Optional[str] = None,
import: Optional[str] = None,
importTo: Optional[str] = None,
meta: Optional[Dict[str, Any]] = None,
programmingLanguage: Optional[str] = None
) -> None:
Expand All @@ -202,10 +202,10 @@ def __init__(
meta=meta,
programmingLanguage=programmingLanguage
)
if export is not None:
self.export = export
if import is not None:
self.import = import
if exportFrom is not None:
self.exportFrom = exportFrom
if importTo is not None:
self.importTo = importTo


class CodeChunk(CodeBlock):
Expand All @@ -229,10 +229,10 @@ def __init__(
declares: Optional[Array[Union[str, "Variable", "Function"]]] = None,
duration: Optional[float] = None,
errors: Optional[Array["CodeError"]] = None,
export: Optional[str] = None,
exportFrom: Optional[str] = None,
format: Optional[str] = None,
id: Optional[str] = None,
import: Optional[str] = None,
importTo: Optional[str] = None,
imports: Optional[Array[Union[str, "SoftwareSourceCode", "SoftwareApplication"]]] = None,
meta: Optional[Dict[str, Any]] = None,
outputs: Optional[Array["Node"]] = None,
Expand All @@ -242,10 +242,10 @@ def __init__(
) -> None:
super().__init__(
text=text,
export=export,
exportFrom=exportFrom,
format=format,
id=id,
import=import,
importTo=importTo,
meta=meta,
programmingLanguage=programmingLanguage
)
Expand Down Expand Up @@ -1301,18 +1301,18 @@ class Link(Entity):

content: Array["InlineContent"]
target: str
export: Optional[str] = None
import: Optional[str] = None
exportFrom: Optional[str] = None
importTo: Optional[str] = None
relation: Optional[str] = None
title: Optional[str] = None

def __init__(
self,
content: Array["InlineContent"],
target: str,
export: Optional[str] = None,
exportFrom: Optional[str] = None,
id: Optional[str] = None,
import: Optional[str] = None,
importTo: Optional[str] = None,
meta: Optional[Dict[str, Any]] = None,
relation: Optional[str] = None,
title: Optional[str] = None
Expand All @@ -1325,10 +1325,10 @@ def __init__(
self.content = content
if target is not None:
self.target = target
if export is not None:
self.export = export
if import is not None:
self.import = import
if exportFrom is not None:
self.exportFrom = exportFrom
if importTo is not None:
self.importTo = importTo
if relation is not None:
self.relation = relation
if title is not None:
Expand Down
36 changes: 18 additions & 18 deletions r/R/types.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,20 +185,20 @@ Code <- function(
#'
#' @name CodeBlock
#' @param text The text of the code. \bold{Required}.
#' @param export A compilation directive giving the name of the variable to export into the content of the code block.
#' @param exportFrom A compilation directive giving the name of the variable to export into the content of the code block.
#' @param format Media type, typically expressed using a MIME format, of the code.
#' @param id The identifier for this item.
#' @param import A compilation directive giving the name of the variable to import the content of the code block as.
#' @param importTo A compilation directive giving the name of the variable to import the content of the code block as.
#' @param meta Metadata associated with this item.
#' @param programmingLanguage The programming language of the code.
#' @seealso \code{\link{Code}}
#' @export
CodeBlock <- function(
text,
export,
exportFrom,
format,
id,
import,
importTo,
meta,
programmingLanguage
){
Expand All @@ -210,8 +210,8 @@ CodeBlock <- function(
programmingLanguage = programmingLanguage
)
self$type <- as_scalar("CodeBlock")
self[["export"]] <- check_property("CodeBlock", "export", FALSE, missing(export), "character", export)
self[["import"]] <- check_property("CodeBlock", "import", FALSE, missing(import), "character", import)
self[["exportFrom"]] <- check_property("CodeBlock", "exportFrom", FALSE, missing(exportFrom), "character", exportFrom)
self[["importTo"]] <- check_property("CodeBlock", "importTo", FALSE, missing(importTo), "character", importTo)
class(self) <- c(class(self), "CodeBlock")
self
}
Expand All @@ -226,10 +226,10 @@ CodeBlock <- function(
#' @param declares Variables that the code chunk declares.
#' @param duration Duration in seconds of the last execution of the chunk.
#' @param errors Errors when compiling or executing the chunk.
#' @param export A compilation directive giving the name of the variable to export into the content of the code block.
#' @param exportFrom A compilation directive giving the name of the variable to export into the content of the code block.
#' @param format Media type, typically expressed using a MIME format, of the code.
#' @param id The identifier for this item.
#' @param import A compilation directive giving the name of the variable to import the content of the code block as.
#' @param importTo A compilation directive giving the name of the variable to import the content of the code block as.
#' @param imports Software packages that the code chunk imports
#' @param meta Metadata associated with this item.
#' @param outputs Outputs from executing the chunk.
Expand All @@ -245,10 +245,10 @@ CodeChunk <- function(
declares,
duration,
errors,
export,
exportFrom,
format,
id,
import,
importTo,
imports,
meta,
outputs,
Expand All @@ -258,10 +258,10 @@ CodeChunk <- function(
){
self <- CodeBlock(
text = text,
export = export,
exportFrom = exportFrom,
format = format,
id = id,
import = import,
importTo = importTo,
meta = meta,
programmingLanguage = programmingLanguage
)
Expand Down Expand Up @@ -1559,9 +1559,9 @@ IntegerValidator <- function(
#' @name Link
#' @param content The textual content of the link. \bold{Required}.
#' @param target The target of the link. \bold{Required}.
#' @param export A compilation directive giving the name of the variable to export to the link target.
#' @param exportFrom A compilation directive giving the name of the variable to export to the link target.
#' @param id The identifier for this item.
#' @param import A compilation directive giving the name of the variable to import the link target as.
#' @param importTo A compilation directive giving the name of the variable to import the link target as.
#' @param meta Metadata associated with this item.
#' @param relation The relation between the target and the current thing.
#' @param title A title for the link.
Expand All @@ -1570,9 +1570,9 @@ IntegerValidator <- function(
Link <- function(
content,
target,
export,
exportFrom,
id,
import,
importTo,
meta,
relation,
title
Expand All @@ -1584,8 +1584,8 @@ Link <- function(
self$type <- as_scalar("Link")
self[["content"]] <- check_property("Link", "content", TRUE, missing(content), Array(InlineContent), content)
self[["target"]] <- check_property("Link", "target", TRUE, missing(target), "character", target)
self[["export"]] <- check_property("Link", "export", FALSE, missing(export), "character", export)
self[["import"]] <- check_property("Link", "import", FALSE, missing(import), "character", import)
self[["exportFrom"]] <- check_property("Link", "exportFrom", FALSE, missing(exportFrom), "character", exportFrom)
self[["importTo"]] <- check_property("Link", "importTo", FALSE, missing(importTo), "character", importTo)
self[["relation"]] <- check_property("Link", "relation", FALSE, missing(relation), "character", relation)
self[["title"]] <- check_property("Link", "title", FALSE, missing(title), "character", title)
class(self) <- c(class(self), "Link")
Expand Down

0 comments on commit e62ea86

Please sign in to comment.