Skip to content

chore: set new default value for minimum to 3.9 and default max to 3.13 #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ markdown_extensions:
- pymdownx.tabbed:
plugins:
- auto_pytabs:
min_version: "3.7" # optional
max_version: "3.12" # optional
min_version: "3.9" # optional
max_version: "3.13" # optional
tab_title_template: "Python {min_version}+" # optional
no_cache: false # optional
default_tab: "highest" # optional
Expand All @@ -85,8 +85,8 @@ plugins:

| Name | Default | Description |
| -------------------- | ------------------------- | -------------------------------------------------------------------------- |
| `min_version` | `(3, 7)` | Minimum python version |
| `max_version` | `(3, 12)` | Maximum python version |
| `min_version` | `(3, 9)` | Minimum python version |
| `max_version` | `(3, 13)` | Maximum python version |
| `tab_title_template` | `"Python {min_version}+"` | Template for tab titles |
| `no_cache` | `False` | Disable file system caching |
| `default_tab` | `highest` | (`highest` or `lowest`) Version tab to preselect |
Expand All @@ -101,8 +101,8 @@ md = markdown.Markdown(
extensions=["auto_pytabs"],
extension_configs={
"auto_pytabs": {
"min_version": "3.7", # optional
"max_version": "3.12", # optional
"min_version": "3.9", # optional
"max_version": "3.13", # optional
"tab_title_template": "Python {min_version}+", # optional
"default_tab": "highest", # optional
"reverse_order": False, # optional
Expand All @@ -115,8 +115,8 @@ md = markdown.Markdown(

| Name | Default | Description |
| -------------------- | ------------------------- | -------------------------------------------------------------------------- |
| `min_version` | `(3, 7)` | Minimum python version to generate code for |
| `max_version` | `(3, 7)` | Maximum python version to generate code for |
| `min_version` | `(3, 9)` | Minimum python version to generate code for |
| `max_version` | `(3, 13)` | Maximum python version to generate code for |
| `tab_title_template` | `"Python {min_version}+"` | Template for tab titles |
| `default_tab` | `highest` | (`highest` or `lowest`) Version tab to preselect |
| `reverse_order` | `False` | Reverse the order of tabs. Default is to go from lowest to highest version |
Expand Down Expand Up @@ -288,8 +288,8 @@ for the `.. code-block` and `.. literalinclude` directives.
```python
extensions = ["auto_pytabs.sphinx_ext", "sphinx_design"]

auto_pytabs_min_version = (3, 7) # optional
auto_pytabs_max_version = (3, 11) # optional
auto_pytabs_min_version = (3, 9) # optional
auto_pytabs_max_version = (3, 13) # optional
auto_pytabs_tab_title_template = "Python {min_version}+" # optional
# auto_pytabs_no_cache = True # disabled file system caching
# auto_pytabs_compat_mode = True # enable compatibility mode
Expand All @@ -301,8 +301,8 @@ auto_pytabs_tab_title_template = "Python {min_version}+" # optional

| Name | Default | Description |
| -------------------------------- | ------------------------- | -------------------------------------------------------------------------- |
| `auto_pytabs_min_version` | `(3, 7)` | Minimum python version to generate code for |
| `auto_pytabs_max_version` | `(3, 7)` | Maximum python version to generate code for |
| `auto_pytabs_min_version` | `(3, 9)` | Minimum python version to generate code for |
| `auto_pytabs_max_version` | `(3, 13)` | Maximum python version to generate code for |
| `auto_pytabs_tab_title_template` | `"Python {min_version}+"` | Template for tab titles |
| `auto_pytabs_no_cache` | `False` | Disable file system caching |
| `auto_pytabs_compat_mode` | `False` | Enable [compatibility mode](#compatibility-mode) |
Expand Down
4 changes: 2 additions & 2 deletions auto_pytabs/markdown_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ def run(self, lines: list[str]) -> list[str]:
class AutoPyTabsExtension(Extension):
def __init__(self, *args: Any, cache: Cache | None, **kwargs: Any):
self.config = {
"min_version": ["3.7", "minimum version"],
"max_version": ["3.12", "maximum version"],
"min_version": ["3.9", "minimum version"],
"max_version": ["3.13", "maximum version"],
"tab_title_template": ["", "tab title format-string"],
"default_tab": ["highest", "version tab to preselect"],
"reverse_order": [False, "reverse the order of tabs"],
Expand Down
4 changes: 2 additions & 2 deletions auto_pytabs/mkdocs_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@


class PluginConfig(Config): # type: ignore[no-untyped-call]
min_version = config_options.Type(str, default="3.7")
max_version = config_options.Type(str, default="3.12")
min_version = config_options.Type(str, default="3.9")
max_version = config_options.Type(str, default="3.13")
tab_title_template = config_options.Type(str, default="Python {min_version}+")
no_cache = config_options.Type(bool, default=False)
default_tab = config_options.Choice(["highest", "lowest"], default="highest")
Expand Down
4 changes: 2 additions & 2 deletions auto_pytabs/sphinx_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ def setup(app: Sphinx) -> dict[str, bool | str]:
default="Python {min_version}+",
rebuild="html",
)
app.add_config_value("auto_pytabs_min_version", default=(3, 7), rebuild="html")
app.add_config_value("auto_pytabs_max_version", default=(3, 12), rebuild="html")
app.add_config_value("auto_pytabs_min_version", default=(3, 9), rebuild="html")
app.add_config_value("auto_pytabs_max_version", default=(3, 13), rebuild="html")
app.add_config_value("auto_pytabs_no_cache", default=False, rebuild="html")
app.add_config_value("auto_pytabs_compat_mode", default=False, rebuild="html")
app.add_config_value("auto_pytabs_default_tab", default="highest", rebuild="html")
Expand Down
Loading
Loading