Skip to content
This repository was archived by the owner on Dec 24, 2025. It is now read-only.

Commit 8507cda

Browse files
authored
v1: Remove _async suffix from all methods, remove fire-n-forget counterparts, code improvements (#9)
* configs * remove fire-and-forget methods | remove _async in methods name * updates
1 parent f6aa554 commit 8507cda

File tree

22 files changed

+100
-274
lines changed

22 files changed

+100
-274
lines changed

.ci/patch_pubspec_version.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# /// script
2+
# dependencies = ["pyyaml"]
3+
# ///
4+
15
import os
26
import pathlib
37
import sys
@@ -17,7 +21,7 @@
1721
"flet",
1822
]
1923

20-
with open(pubspec_path, "r") as f:
24+
with open(pubspec_path) as f:
2125
data = yaml.safe_load(f)
2226

2327
# patch version

.ci/patch_toml_version.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# /// script
2+
# dependencies = ["tomlkit"]
3+
# ///
4+
15
import os
26
import pathlib
37
import sys
@@ -14,7 +18,7 @@
1418
print(f"Patching TOML file {toml_path} to {ver}")
1519

1620
# read
17-
with open(toml_path, "r") as f:
21+
with open(toml_path) as f:
1822
t = tomlkit.parse(f.read())
1923

2024
# patch version

.docstr.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
paths: src/flet_map
2+
badge: ./docs/assets/badges/docs-coverage.svg
3+
skip_file_doc: True
4+
skip_private: False
5+
ignore_patterns: # Dict with key/value pairs of file-pattern/node-pattern
6+
.*: __post_init__ # Ignore __post_init__ in all files
7+
fail_under: 50

.github/workflows/docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
- dev
87
paths:
98
- 'LICENSE'
109
- 'CHANGELOG.md'

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ This package supports the following platforms:
2525
| Android ||
2626
| Web ||
2727

28-
## Installation
28+
## Usage
29+
30+
### Installation
2931

3032
To install the `flet-map` package and add it to your project dependencies:
3133

@@ -45,6 +47,6 @@ To install the `flet-map` package and add it to your project dependencies:
4547
poetry add flet-map
4648
```
4749

48-
## Examples
50+
### Examples
4951

50-
For examples, see [this](./examples)
52+
For examples, see [these](./examples).

appveyor.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,20 @@ image: ubuntu
33
version: '0.1.{build}'
44

55
environment:
6+
PYTHON_VERSION: 3.12
67
UV_PUBLISH_TOKEN:
78
secure: 174ncAbF5IjSIkmioPt62jeSnzmTlRNchUkE4QdjDWH8xK1olYtySXLJpo2q95HcP7lWJky1hv4APESiRRHnBWoY0XRFafzM/mbCDMzG1tZXiXZmpP1qzHAtRP2QSCIg18xh1TMktraUdTi7sbJnjjRhqzgbW1k0kLBxKw79MPFBhYQ/TiGcmaYWZbWVZNY3HCUCb6Dt7bG1OE2Ul9rD1gvs55xwO9Oq9FOVA1VnMYw=
89

9-
stack:
10-
- python 3.12
11-
1210
install:
1311
- source .ci/update_build_version.sh
14-
- python --version
15-
- python -m ensurepip --upgrade
16-
- pip3 install --upgrade tomlkit pyyaml
1712
- curl -LsSf https://astral.sh/uv/install.sh | sh
18-
- export PATH=$HOME/.local/bin:$PATH
13+
- export PATH="$HOME/.local/bin:$PATH"
14+
- uv python install $PYTHON_VERSION
15+
- uv python pin $PYTHON_VERSION
1916

2017
build_script:
21-
- python .ci/patch_toml_version.py pyproject.toml $PYPI_VER
22-
- python .ci/patch_pubspec_version.py src/flutter/flet_*/pubspec.yaml $PKG_VER
18+
- uv run .ci/patch_toml_version.py pyproject.toml $PYPI_VER
19+
- uv run .ci/patch_pubspec_version.py src/flutter/flet_*/pubspec.yaml $PKG_VER
2320
- (cd src/flutter/* && dart pub get && dart analyze && cd -)
2421
- uv build
2522

@@ -32,4 +29,4 @@ deploy_script:
3229
artifacts:
3330
- path: dist/*.whl
3431

35-
test: off
32+
test: off

docs/index.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ To install the `flet-map` package and add it to your project dependencies:
4444
poetry add flet-map
4545
```
4646

47+
### Examples
4748

48-
## Example
49-
50-
```python title="main.py"
51-
--8<-- "examples/map_example/src/main.py"
52-
```
49+
See [these](map.md#examples).

docs/map.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
::: flet_map.map.Map
1+
## Examples
2+
3+
### Example 1
4+
5+
```python title="example_1.py"
6+
--8<-- "examples/map_example/src/example_1.py"
7+
```
8+
9+
::: flet_map.map.Map
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def handle_tap(e: ftm.MapTapEvent):
6565
),
6666
ftm.SimpleAttribution(
6767
text="Flet",
68-
alignment=ft.Alignment.top_right(),
68+
alignment=ft.Alignment.TOP_RIGHT,
6969
on_click=lambda e: print("Clicked SimpleAttribution"),
7070
),
7171
ftm.MarkerLayer(

mkdocs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ plugins:
149149
alias_type: symlink
150150
- glightbox
151151
- section-index
152+
- external-images:
153+
mappings:
154+
- source_dir: examples
155+
target_url_path: examples
156+
include_exts: [ ".png", ".gif", ".svg" ]
152157
- mkdocstrings:
153158
default_handler: python_xref
154159
handlers:
@@ -174,7 +179,6 @@ plugins:
174179
preload_modules: [ flet ]
175180
filters:
176181
- "!^_" # Exclude private members starting with only one underscore
177-
- "!get_event_field_type"
178182
extensions:
179183
- griffe_modernized_annotations
180184
- griffe_warnings_deprecated
@@ -225,3 +229,4 @@ markdown_extensions:
225229
- pymdownx.tasklist:
226230
custom_checkbox: true
227231
- pymdownx.tilde
232+
- pymdownx.blocks.caption

0 commit comments

Comments
 (0)