Skip to content

Commit

Permalink
attempt to close #238
Browse files Browse the repository at this point in the history
  • Loading branch information
shajoezhu committed Jan 7, 2025
1 parent ceca6ef commit 04cd065
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions R/rlistings_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,23 @@ dflt_courier <- font_spec("Courier", 9, 1)
#' @export
#' @name listing_methods
print.listing_df <- function(x, widths = NULL, tf_wrap = FALSE, max_width = NULL, fontspec = NULL, col_gap = 3L, ...) {
cat(
toString(
matrix_form(x, fontspec = fontspec, col_gap = col_gap),
widths = widths,
tf_wrap = tf_wrap,
max_width = max_width,
fontspec = fontspec,
col_gap = col_gap,
...
tryCatch({
cat(
toString(
matrix_form(x, fontspec = fontspec, col_gap = col_gap),
widths = widths,
tf_wrap = tf_wrap,
max_width = max_width,
fontspec = fontspec,
col_gap = col_gap,
...
)
)
}, error = function(e) {

Check warning on line 30 in R/rlistings_methods.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=R/rlistings_methods.R,line=30,col=4,[indentation_linter] Indentation should be 2 spaces but is 4 spaces.
if (nrow(x) == 0){

Check warning on line 31 in R/rlistings_methods.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=R/rlistings_methods.R,line=31,col=24,[brace_linter] There should be a space before an opening curly brace.

Check warning on line 31 in R/rlistings_methods.R

View workflow job for this annotation

GitHub Actions / SuperLinter 🦸‍♀️ / Lint R code 🧶

file=R/rlistings_methods.R,line=31,col=24,[paren_body_linter] There should be a space between a right parenthesis and a body expression.
print("No observation in the listing object.")
}
}
)
invisible(x)
}
Expand Down

0 comments on commit 04cd065

Please sign in to comment.