Skip to content

Commit

Permalink
Merge pull request #1028 from prescod/feature/fix-pyright
Browse files Browse the repository at this point in the history
Make recent versions of pyright happy
  • Loading branch information
jstvz authored Apr 8, 2024
2 parents 7be154d + c43a0f7 commit 9baecf5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions snowfakery/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def __init__(self, interpreter):
def custom_functions(self, *args, **kwargs):
"""Instantiate, contextualize and return a function library
Default behaviour is to return self.Function()."""
functions = self.Functions()
Default behaviour is to return self.Functions()."""
functions = self.Functions() # type: ignore
functions.context = self.context
return functions

Expand Down Expand Up @@ -200,7 +200,7 @@ def resolve_plugins(
with plugin_path(search_paths):
plugins = []
for plugin_spec in plugin_specs:
plugins.extend(resolve_plugin(*plugin_spec))
plugins.extend(resolve_plugin(*plugin_spec)) # type: ignore
return plugins


Expand Down Expand Up @@ -312,7 +312,7 @@ def __init_subclass__(cls, **kwargs):


def _register_for_continuation(cls):
SnowfakeryDumper.add_representer(cls, Representer.represent_object)
SnowfakeryDumper.add_representer(cls, Representer.represent_object) # type: ignore
yaml.SafeLoader.add_constructor(
f"tag:yaml.org,2002:python/object/apply:{cls.__module__}.{cls.__name__}",
lambda loader, node: cls._from_continuation(
Expand All @@ -327,7 +327,7 @@ class PluginResultIterator(PluginResult):
def __init__(self, repeat):
self.repeat = repeat

def __iter__(self):
def __iter__(self) -> T.Iterator:
return self

def __next__(self):
Expand Down
2 changes: 1 addition & 1 deletion snowfakery/salesforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def create_cci_record_type_tables(db_url: str):
_populate_rt_table(connection, table, record_type_column, rt_table)


def _create_record_type_table(tablename: str, metadata: MetaData):
def _create_record_type_table(tablename: str, metadata: MetaData) -> Table:
"""Create a table to store mapping between Record Type Ids and Developer Names."""
rt_map_fields = [
Column("record_type_id", Unicode(18), primary_key=True),
Expand Down

0 comments on commit 9baecf5

Please sign in to comment.