From 51ea6f10133c4cb7ce0bb9244ba8b962f3d8b07a Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 26 Mar 2024 11:47:09 +0100 Subject: [PATCH] fix snippets after devel merge --- docs/tools/check_embedded_snippets.py | 2 ++ docs/tools/lint_setup/template.py | 2 +- docs/tools/utils.py | 4 ++-- .../docs/general-usage/credentials/config_specs.md | 12 ++++++------ mypy.ini | 3 +++ 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/tools/check_embedded_snippets.py b/docs/tools/check_embedded_snippets.py index 9c74025cab..96e1227745 100644 --- a/docs/tools/check_embedded_snippets.py +++ b/docs/tools/check_embedded_snippets.py @@ -20,6 +20,7 @@ ENABLE_MYPY = True + @dataclass class Snippet: index: int @@ -224,6 +225,7 @@ def typecheck_snippets(snippets: List[Snippet], verbose: bool) -> None: failed_count += 1 fmt.warning(f"Failed to type check {str(snippet)}") fmt.echo(result.stdout.strip()) + fmt.echo(result.stderr.strip()) if failed_count: fmt.error(f"Failed to type check {failed_count} snippets") diff --git a/docs/tools/lint_setup/template.py b/docs/tools/lint_setup/template.py index 6b207ceb0b..c72c4dba62 100644 --- a/docs/tools/lint_setup/template.py +++ b/docs/tools/lint_setup/template.py @@ -34,4 +34,4 @@ ex: Exception = None # type: ignore[assignment] load_info: LoadInfo = None # type: ignore[assignment] url: str = None # type: ignore[assignment] -my_resource: DltResource = None # type: ignore[assignment] \ No newline at end of file +my_resource: DltResource = None # type: ignore[assignment] diff --git a/docs/tools/utils.py b/docs/tools/utils.py index 7cbfe8fea3..f71d68bd86 100644 --- a/docs/tools/utils.py +++ b/docs/tools/utils.py @@ -16,7 +16,7 @@ def collect_markdown_files(verbose: bool) -> List[str]: # collect docs pages markdown_files: List[str] = [] - for filepath in glob.glob(f'{DOCS_DIR}/**/*.md', recursive=True): + for filepath in glob.glob(f"{DOCS_DIR}/**/*.md", recursive=True): if "api_reference" in filepath: continue if "jaffle_shop" in filepath: @@ -26,7 +26,7 @@ def collect_markdown_files(verbose: bool) -> List[str]: fmt.echo(f"Discovered {filepath}") # collect blog pages - for filepath in glob.glob(f'{BLOG_DIR}/**/*.md', recursive=True): + for filepath in glob.glob(f"{BLOG_DIR}/**/*.md", recursive=True): markdown_files.append(filepath) if verbose: fmt.echo(f"Discovered {filepath}") diff --git a/docs/website/docs/general-usage/credentials/config_specs.md b/docs/website/docs/general-usage/credentials/config_specs.md index e66939fc39..30b401727d 100644 --- a/docs/website/docs/general-usage/credentials/config_specs.md +++ b/docs/website/docs/general-usage/credentials/config_specs.md @@ -118,12 +118,12 @@ It also allows for the addition of scopes and provides methods for client authen Usage: ```py -credentials = OAuth2Credentials({ - "client_id": "CLIENT_ID", - "client_secret": "CLIENT_SECRET", - "refresh_token": "REFRESH_TOKEN", - "scopes": ["scope1", "scope2"] -}) +credentials = OAuth2Credentials( + client_id="CLIENT_ID", + client_secret="CLIENT_SECRET", # type: ignore + refresh_token="REFRESH_TOKEN", # type: ignore + scopes=["scope1", "scope2"] +) # Authorize the client credentials.auth() diff --git a/mypy.ini b/mypy.ini index 829da1c6ce..089fde35aa 100644 --- a/mypy.ini +++ b/mypy.ini @@ -116,4 +116,7 @@ ignore_missing_imports = True ignore_missing_imports = True [mypy-dotenv.*] +ignore_missing_imports = True + +[mypy-pytz.*] ignore_missing_imports = True \ No newline at end of file