Description Usage Arguments Value Examples
Run 'pylint' on a file or a folder.
1 | pylint(modules)
|
modules |
one or more Python files, or a folder containing Python files |
A htmlwidget
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
sample_code_file <- system.file("sample_code.py", package = "pylintR")
code_lines <- readLines(sample_code_file)
nlines <- length(code_lines)
# Here is the code:
cat(paste0(format(seq_len(nlines), width = 2), ") ", code_lines), sep = "\n")
# let's copy this Python file in a temporary folder
file_copy <- tempfile(fileext = ".py")
file.copy(sample_code_file, file_copy)
wd <- setwd(tempdir())
# let's lint it with pylint:
pylint(basename(file_copy))
# restore current directory
setwd(wd)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.