Skip to content

Commit

Permalink
Merge pull request #1531 from alinsavix/mypy_explicit_exports
Browse files Browse the repository at this point in the history
explicitly list exported package symbols
  • Loading branch information
alifeee authored Feb 24, 2025
2 parents 56b0de2 + 46f11e0 commit 35e70ba
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
41 changes: 41 additions & 0 deletions gspread/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,44 @@
from .http_client import BackOffHTTPClient, HTTPClient
from .spreadsheet import Spreadsheet
from .worksheet import ValueRange, Worksheet

from . import urls as urls
from . import utils as utils

__all__ = [
# from .auth
"api_key",
"authorize",
"oauth",
"oauth_from_dict",
"service_account",
"service_account_from_dict",

# from .cell
"Cell",

# from .client
"Client",

# from .http_client
"BackOffHTTPClient",
"HTTPClient",

# from .spreadsheet
"Spreadsheet",

# from .worksheet
"Worksheet",
"ValueRange",

# from .exceptions
"GSpreadException",
"IncorrectCellLabel",
"NoValidUrlKeyFound",
"SpreadsheetNotFound",
"WorksheetNotFound",

# full module imports
"urls",
"utils",
]
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ show-source = True
statistics = True

[isort]
extend_skip=.tox,./env
extend_skip=.tox,./env,./gspread/__init__.py
profile=black

# Used by the CI to check code format/security
[testenv:lint]
description = Run code linters
deps = -r lint-requirements.txt
commands = black --check --diff --extend-exclude "./env" .
commands = black --check --diff --extend-exclude="./env|gspread/__init__.py" .
codespell --skip=".tox,.git,./docs/build,.mypy_cache,./env" .
flake8 .
isort --check-only .
Expand All @@ -38,7 +38,7 @@ commands = black --check --diff --extend-exclude "./env" .
[testenv:format]
description = Format code
deps = -r lint-requirements.txt
commands = black --extend-exclude "./env" .
commands = black --extend-exclude="./env|gspread/__init__.py" .
isort .


Expand Down

0 comments on commit 35e70ba

Please sign in to comment.