Skip to content

Commit

Permalink
ensureStubPackageNamed: should always return a stub
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Dec 6, 2024
1 parent 88fe783 commit 6c8a54f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Famix-Python-Importer/FamixPythonImporterVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,12 @@ FamixPythonImporterVisitor >> ensureStubContainerNamed: aString [
{ #category : 'private-entity-creation' }
FamixPythonImporterVisitor >> ensureStubPackageNamed: aString [

^ (self packageNamed: aString) ifNil: [
(model newPackageNamed: aString)
isStub: true;
yourself ]
^ model allPackages
detect: [ :class | class isStub and: [ class name = aString ] ]
ifNone: [
(model newPackageNamed: aString)
isStub: true;
yourself ]
]

{ #category : 'private-entity-creation' }
Expand Down

0 comments on commit 6c8a54f

Please sign in to comment.