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

Method has_invalid_syntax

crates/ruff_python_parser/src/lib.rs:439–441  ·  view source on GitHub ↗

Returns `true` if the parsed source code is invalid i.e., it has [`ParseError`]s. Note that this does not include version-related [`UnsupportedSyntaxError`]s. See [`Parsed::has_no_syntax_errors`] for a version that takes these into account.

(&self)

Source from the content-addressed store, hash-verified

437 ///
438 /// See [`Parsed::has_no_syntax_errors`] for a version that takes these into account.
439 pub fn has_invalid_syntax(&self) -> bool {
440 !self.has_valid_syntax()
441 }
442
443 /// Returns `true` if the parsed source code does not contain any [`ParseError`]s *or*
444 /// [`UnsupportedSyntaxError`]s.

Callers 1

parser_quick_testFunction · 0.45

Calls 1

has_valid_syntaxMethod · 0.80

Tested by 1

parser_quick_testFunction · 0.36