mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-17 20:54:38 +03:00
Improve type definitions and styles (#869)
- exclude .reviewdog.yml from source distribution - Add more type hints - protective check for self.config in SettingsClass Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
@@ -18,13 +18,15 @@
|
||||
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
from typing import List, Optional
|
||||
from typing import List, Optional, Any
|
||||
|
||||
DOCS_CONFIG = "https://aqtinstall.readthedocs.io/en/stable/configuration.html#configuration"
|
||||
|
||||
|
||||
class AqtException(Exception):
|
||||
def __init__(self, *args, suggested_action: Optional[List[str]] = None, should_show_help: bool = False, **kwargs) -> None:
|
||||
def __init__(
|
||||
self, *args, suggested_action: Optional[List[str]] = None, should_show_help: bool = False, **kwargs: Any
|
||||
) -> None:
|
||||
self.suggested_action: List[str] = suggested_action or []
|
||||
self.should_show_help: bool = should_show_help or False
|
||||
super(AqtException, self).__init__(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user