Skip to content

Commit

Permalink
fix snippets after devel merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-rp committed Mar 26, 2024
1 parent 98981bb commit 51ea6f1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
2 changes: 2 additions & 0 deletions docs/tools/check_embedded_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

ENABLE_MYPY = True


@dataclass
class Snippet:
index: int
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/lint_setup/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
my_resource: DltResource = None # type: ignore[assignment]
4 changes: 2 additions & 2 deletions docs/tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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}")
Expand Down
12 changes: 6 additions & 6 deletions docs/website/docs/general-usage/credentials/config_specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,7 @@ ignore_missing_imports = True
ignore_missing_imports = True

[mypy-dotenv.*]
ignore_missing_imports = True

[mypy-pytz.*]
ignore_missing_imports = True

0 comments on commit 51ea6f1

Please sign in to comment.