From da022aa4a4ecabf99c4328d706612c6ea8f373bf Mon Sep 17 00:00:00 2001 From: Alex Mykyta Date: Sat, 11 Mar 2023 22:40:27 -0800 Subject: [PATCH] Lint fixup --- src/peakrdl/config/loader.py | 4 ++-- src/peakrdl/config/schema.py | 4 ++-- src/peakrdl/importer.py | 2 +- test/run.sh | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/peakrdl/config/loader.py b/src/peakrdl/config/loader.py index 419d32e..27c116a 100644 --- a/src/peakrdl/config/loader.py +++ b/src/peakrdl/config/loader.py @@ -2,6 +2,8 @@ import os import sys +from . import schema + if sys.version_info[0:2] < (3, 11): # Prior to py3.11, tomllib is a 3rd party package import tomli as tomllib @@ -9,8 +11,6 @@ # py3.11 and onwards, tomli was absorbed into the standard library as tomllib import tomllib -from . import schema - class AppConfig: def __init__(self, path: str, raw_data: Dict[str, Any]) -> None: self.path = path diff --git a/src/peakrdl/config/schema.py b/src/peakrdl/config/schema.py index 0d2839c..cfdff76 100644 --- a/src/peakrdl/config/schema.py +++ b/src/peakrdl/config/schema.py @@ -38,10 +38,10 @@ class Boolean(_SimpleType): TYPE = bool class DateTime(_SimpleType): - TYPE = datetime.datetime + TYPE = datetime.datetime # type: ignore class Date(_SimpleType): - TYPE = datetime.date + TYPE = datetime.date # type: ignore class Time(_SimpleType): TYPE = datetime.time diff --git a/src/peakrdl/importer.py b/src/peakrdl/importer.py index a35d736..e1c9ea2 100644 --- a/src/peakrdl/importer.py +++ b/src/peakrdl/importer.py @@ -59,7 +59,7 @@ def is_compatible(self, path: str) -> bool: def add_importer_arguments(self, arg_group: 'argparse._ActionsContainer') -> None: - """ + """ Override this function to define additional command line arguments by using the ``arg_group.add_argument()`` method. See Python's `argparse module `_ diff --git a/test/run.sh b/test/run.sh index e4610ea..b216748 100755 --- a/test/run.sh +++ b/test/run.sh @@ -7,6 +7,7 @@ this_dir="$( cd "$(dirname "$0")" ; pwd -P )" # Initialize venv venv_bin=$this_dir/.venv/bin python3 -m venv $this_dir/.venv +source $venv_bin/activate #tools python=$venv_bin/python