View Source on Github

Attributes

classes

list[ Class ]

Get a recursive list of all classes in files container.

exports

list[ TSExport ]

Get a recursive list of all exports in files container.

files_source

Callable [FilesParam, Iterable[TFile]]

A callable that returns an iterable of all files in the codebase.

functions

list[ Function ]

Get a recursive list of all functions in files container.

global_vars

list[ Assignment ]

Get a recursive list of all global variables in files container.

import_statements

Get a recursive list of all import statements in files container.

imports

list[ Import ]

Get a recursive list of all imports in files container.

name

str

The name of the code owner.

owner_type

Literal[USERNAME, TEAM, EMAIL]

The type of the owner (USERNAME, TEAM, EMAIL).

owner_value

str

The value of the owner.

symbols

list[ Symbol ]

Get a recursive list of all symbols in files container.

Methods

files

Recursively iterate over all files in the codebase that are owned by the current code owner.

View Source on Github

Returns

Iterable[TFile]

from_parser

Create a list of CodeOwner objects from a CodeOwnersParser.

View Source on Github

Parameters

parser
CodeOwnersParser
required

The CodeOwnersParser to use.

file_source
Callable [FilesParam, Iterable[TFile]]
required

A callable that returns an iterable of all files in the codebase.

Returns

list[ CodeOwner ]

A list of CodeOwner objects.

get_class

Get a class by name in files container.

View Source on Github

Returns

Class | None

get_export

Get an export by name in files container (supports only typescript).

View Source on Github

Returns

TSExport | None

get_function

Get a function by name in files container.

View Source on Github

Returns

Function | None

get_global_var

Get a global variable by name in files container.

View Source on Github

Returns

Assignment | None

get_import

Get an import by name in files container.

View Source on Github

Returns

Import | None

get_import_statement

Get an import statement by name in files container.

View Source on Github

Returns

get_symbol

Get a symbol by name in files container.

View Source on Github

Returns

Symbol | None

Was this page helpful?