@suss/adapter-python 0.35.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -2,8 +2,8 @@ import { RequestSpellingMetadata, TypeShape, WrapperReference, BehavioralSummary
2
2
  import { Tree, Node } from 'web-tree-sitter';
3
3
  export { Node as PyNode, Tree as PyTree } from 'web-tree-sitter';
4
4
  import { Database } from '@suss/datalog';
5
- import { RedirectOption, RawCodeStructure, ExtractorOptions, TimingReport, ExtractionReport, CacheDiagnostic, DeclaredModule, KeptParses } from '@suss/extractor';
6
- import { UnwrapsByName, WhyExplained } from '@suss/resolution';
5
+ import { DeclaredEntryPoint, LibraryEnvVars, RedirectOption, RawCodeStructure, ExtractorOptions, TimingReport, ExtractionReport, CacheDiagnostic, DeclaredModule, KeptParses } from '@suss/extractor';
6
+ import { UnwrapsByName, SubclassPlace, WhyExplained } from '@suss/resolution';
7
7
 
8
8
  /**
9
9
  * Loads the Python grammar into web-tree-sitter and parses a file.
@@ -105,6 +105,14 @@ interface PythonPack {
105
105
  /** Wire protocol for the produced boundary bindings, e.g. "http". */
106
106
  protocol: string;
107
107
  discovery: PythonDiscoveryPattern[];
108
+ /**
109
+ * The functions a deploy manifest says the platform calls in a file,
110
+ * given the file's absolute path. The adapter builds the units on each
111
+ * function it finds by name, and the call walk starts there.
112
+ */
113
+ entryPoints?: (file: string) => DeclaredEntryPoint[];
114
+ /** Environment variables the library reads from its own installed code, where no walk over the project goes. */
115
+ libraryEnvVars?: LibraryEnvVars[];
108
116
  /**
109
117
  * Wrapper modules around the library that a person lists when
110
118
  * configuring the pack. The library's own module does not go here. The adapter
@@ -1033,6 +1041,12 @@ interface ReachedFunction {
1033
1041
  readonly name: string;
1034
1042
  /** `[name]` for a module function, `[Class, name]` for a method. */
1035
1043
  readonly exportPath: string[];
1044
+ /** The subclass the method runs on, when the call reached it through a class that inherits it. Calls on `self` or `cls` then resolve against that class. */
1045
+ readonly receiverClass?: PythonSubclass;
1046
+ }
1047
+ /** A class that inherits a method: its name, the file that declares it, and its key in the value facts. */
1048
+ interface PythonSubclass extends SubclassPlace {
1049
+ readonly key: string;
1036
1050
  }
1037
1051
 
1038
1052
  /**
package/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@ import { RequestSpellingMetadata, TypeShape, WrapperReference, BehavioralSummary
2
2
  import { Tree, Node } from 'web-tree-sitter';
3
3
  export { Node as PyNode, Tree as PyTree } from 'web-tree-sitter';
4
4
  import { Database } from '@suss/datalog';
5
- import { RedirectOption, RawCodeStructure, ExtractorOptions, TimingReport, ExtractionReport, CacheDiagnostic, DeclaredModule, KeptParses } from '@suss/extractor';
6
- import { UnwrapsByName, WhyExplained } from '@suss/resolution';
5
+ import { DeclaredEntryPoint, LibraryEnvVars, RedirectOption, RawCodeStructure, ExtractorOptions, TimingReport, ExtractionReport, CacheDiagnostic, DeclaredModule, KeptParses } from '@suss/extractor';
6
+ import { UnwrapsByName, SubclassPlace, WhyExplained } from '@suss/resolution';
7
7
 
8
8
  /**
9
9
  * Loads the Python grammar into web-tree-sitter and parses a file.
@@ -105,6 +105,14 @@ interface PythonPack {
105
105
  /** Wire protocol for the produced boundary bindings, e.g. "http". */
106
106
  protocol: string;
107
107
  discovery: PythonDiscoveryPattern[];
108
+ /**
109
+ * The functions a deploy manifest says the platform calls in a file,
110
+ * given the file's absolute path. The adapter builds the units on each
111
+ * function it finds by name, and the call walk starts there.
112
+ */
113
+ entryPoints?: (file: string) => DeclaredEntryPoint[];
114
+ /** Environment variables the library reads from its own installed code, where no walk over the project goes. */
115
+ libraryEnvVars?: LibraryEnvVars[];
108
116
  /**
109
117
  * Wrapper modules around the library that a person lists when
110
118
  * configuring the pack. The library's own module does not go here. The adapter
@@ -1033,6 +1041,12 @@ interface ReachedFunction {
1033
1041
  readonly name: string;
1034
1042
  /** `[name]` for a module function, `[Class, name]` for a method. */
1035
1043
  readonly exportPath: string[];
1044
+ /** The subclass the method runs on, when the call reached it through a class that inherits it. Calls on `self` or `cls` then resolve against that class. */
1045
+ readonly receiverClass?: PythonSubclass;
1046
+ }
1047
+ /** A class that inherits a method: its name, the file that declares it, and its key in the value facts. */
1048
+ interface PythonSubclass extends SubclassPlace {
1049
+ readonly key: string;
1036
1050
  }
1037
1051
 
1038
1052
  /**