From 467fbf6ef73cab43b243622a0e350e2493970ad3 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Tue, 1 Nov 2022 16:20:36 +0400 Subject: [PATCH] Makefile, MyPy error fix --- Makefile | 16 ++++++++++++++++ showdialog/__init__.py | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0f11e26 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +build: + python -m build + +upload: + python -m twine upload dist/* + +clean: + rm -rf dist/ + rm -rf showdialog/__pycache__/ + +check: + python -m mypy . + python -m pylint -j 4 ./showdialog + +format: + python -m autopep8 -r --in-place ./showdialog diff --git a/showdialog/__init__.py b/showdialog/__init__.py index 38b966f..3c24872 100644 --- a/showdialog/__init__.py +++ b/showdialog/__init__.py @@ -1,10 +1,11 @@ """Simple module for showing GTK dialog""" +from typing import Union, Optional, Tuple + import gi # type: ignore gi.require_version('Gtk', '3.0') from gi.repository import Gtk # type: ignore -from typing import Union, Optional, Tuple # type: ignore TxtTuple = Tuple[Optional[str], bool] TxtType = Union[TxtTuple, Optional[str]]