Skip to content

Commit 03f6cb3

Browse files
committed
dev-improvements:
- added/configured deps/tools: pre-commit, flake8, isort, coverage + bumped up other deps - extended README.md - docstrings extended - types issues fixed
1 parent a613fba commit 03f6cb3

File tree

14 files changed

+613
-243
lines changed

14 files changed

+613
-243
lines changed

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
default_language_version:
2+
python: python3.8
3+
4+
repos:
5+
- repo: local
6+
hooks:
7+
- id: black
8+
name: black
9+
entry: poetry run black .
10+
language: python
11+
types: [python]
12+
13+
- id: isort
14+
name: isort
15+
entry: poetry run isort .
16+
language: python
17+
types: [python]

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,26 @@ if __name__ == "__main__":
2929
print(TimeEntries(auth=auth).list())
3030
```
3131

32+
- Get toggl User.
33+
34+
```python
35+
from toggl_python import TokenAuth, Users
36+
37+
if __name__ == "__main__":
38+
auth = TokenAuth('AUTH_TOKEN')
39+
print(Users(auth=auth).me())
40+
```
41+
42+
- Get toggl Workspaces.
43+
44+
```python
45+
from toggl_python import TokenAuth, Workspaces
46+
47+
if __name__ == "__main__":
48+
auth = TokenAuth('AUTH_TOKEN')
49+
print(Workspaces(auth=auth).list())
50+
```
51+
3252
* *TODO*
3353

3454
Credits

mypy.ini

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[mypy]
2-
show_column_numbers = True
32
ignore_missing_imports = True
3+
allow_untyped_globals = True
44

5-
[mypy-tests.*]
5+
[mypy-*.migrations.*]
66
ignore_errors = True
7-
show_none_errors = True

0 commit comments

Comments
 (0)