5454import com .python .pydev .analysis .ruff .OnlyRemoveMarkersRuffVisitor ;
5555import com .python .pydev .analysis .ruff .RuffVisitor ;
5656import com .python .pydev .analysis .ruff .RuffVisitorFactory ;
57+ import com .python .pydev .analysis .pyright .OnlyRemoveMarkersPyrightVisitor ;
58+ import com .python .pydev .analysis .pyright .PyrightVisitor ;
59+ import com .python .pydev .analysis .pyright .PyrightVisitorFactory ;
5760
5861/**
5962 * This class is used to do analysis on a thread, so that if an analysis is asked for some analysis that
@@ -80,6 +83,7 @@ public class AnalysisBuilderRunnable extends AbstractAnalysisBuilderRunnable {
8083 private IExternalCodeAnalysisVisitor mypyVisitor ;
8184 private IExternalCodeAnalysisVisitor flake8Visitor ;
8285 private IExternalCodeAnalysisVisitor ruffVisitor ;
86+ private IExternalCodeAnalysisVisitor pyrightVisitor ;
8387
8488 private boolean onlyRecreateCtxInsensitiveInfo ;
8589
@@ -131,18 +135,21 @@ private static boolean isHierarchicallyDerived(IResource curr) {
131135 this .flake8Visitor = visitor ;
132136 } else if (visitor instanceof OnlyRemoveMarkersRuffVisitor || visitor instanceof RuffVisitor ) {
133137 this .ruffVisitor = visitor ;
138+ } else if (visitor instanceof OnlyRemoveMarkersPyrightVisitor || visitor instanceof PyrightVisitor ) {
139+ this .pyrightVisitor = visitor ;
134140 }
135141 }
136- if (pyLintVisitor == null || mypyVisitor == null || flake8Visitor == null || ruffVisitor == null ) {
142+ if (pyLintVisitor == null || mypyVisitor == null || flake8Visitor == null || ruffVisitor == null || pyrightVisitor == null ) {
137143 throw new AssertionError ("All visitor types must be passed." );
138144 }
139145 } else {
140146 this .pyLintVisitor = PyLintVisitorFactory .create (resource , document , module , internalCancelMonitor );
141147 this .mypyVisitor = MypyVisitorFactory .create (resource , document , module , internalCancelMonitor );
142148 this .flake8Visitor = Flake8VisitorFactory .create (resource , document , module , internalCancelMonitor );
143149 this .ruffVisitor = RuffVisitorFactory .create (resource , document , module , internalCancelMonitor );
150+ this .pyrightVisitor = PyrightVisitorFactory .create (resource , document , module , internalCancelMonitor );
144151 this .allVisitors = new IExternalCodeAnalysisVisitor [] { this .pyLintVisitor , this .mypyVisitor ,
145- this .flake8Visitor , this .ruffVisitor };
152+ this .flake8Visitor , this .ruffVisitor , this . pyrightVisitor };
146153 }
147154
148155 for (IExternalCodeAnalysisVisitor visitor : allVisitors ) {
0 commit comments