Skip to content

Commit

Permalink
Including PYI files and private files/symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
notdanilo committed Oct 25, 2023
1 parent 6a6ed3a commit 5fed78b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions ecosystem/python/parser/src/identifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ impl IdentifierParser {
self
.parser
.parse(input)
.and_then(|identifier| if !self.is_private(&identifier) {
Ok(identifier)
} else {
Err(Error::Message(format!("Identifier {} is private", identifier.name)))
})
}

pub fn is_private(&self, identifier: &Identifier) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/python/parser/src/module/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl Parser<Directory<'_>> for PythonParser {
.and_then(|extension| extension.to_str())
.map(String::from)
.unwrap_or_default();
if extension == "py" || path.is_dir() {
if extension == "py" || extension == "pyi" || path.is_dir() {
if let Ok(module) = self.parse(path.as_path()) {
if let Some(existing) = modules
.iter_mut()
Expand Down

0 comments on commit 5fed78b

Please sign in to comment.