MCPcopy Create free account
hub / github.com/astral-sh/ruff / has_no_syntax_errors

Method has_no_syntax_errors

crates/ruff_python_parser/src/lib.rs:447–449  ·  view source on GitHub ↗

Returns `true` if the parsed source code does not contain any [`ParseError`]s *or [`UnsupportedSyntaxError`]s. See [`Parsed::has_valid_syntax`] for a version specific to [`ParseError`]s.

(&self)

Source from the content-addressed store, hash-verified

445 ///
446 /// See [`Parsed::has_valid_syntax`] for a version specific to [`ParseError`]s.
447 pub fn has_no_syntax_errors(&self) -> bool {
448 self.has_valid_syntax() && self.unsupported_syntax_errors.is_empty()
449 }
450
451 /// Returns `true` if the parsed source code contains any [`ParseError`]s *or*
452 /// [`UnsupportedSyntaxError`]s.

Callers 1

has_syntax_errorsMethod · 0.80

Calls 2

has_valid_syntaxMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected