[chirp_devel] [PATCH] Supress console spew from python-future warning in non-debug builds
# HG changeset patch # User Kosta A. ve7kcy@gmail.com # Date 1632713960 25200 # Sun Sep 26 20:39:20 2021 -0700 # Node ID 5aa2294d78ea241c6573dcf1929475b072e73685 # Parent 3a40534ccc6e58d9818224eb8182bb62499fac80 Supress console spew from python-future warning in non-debug builds.
diff --git a/chirp/drivers/anytone778uv.py b/chirp/drivers/anytone778uv.py --- a/chirp/drivers/anytone778uv.py +++ b/chirp/drivers/anytone778uv.py @@ -60,7 +60,7 @@ has_future = True except ImportError: has_future = False - LOG.warning('python-future package is not ' + LOG.debug('python-future package is not ' 'available; %s requires it' % __name__)
diff --git a/chirp/drivers/ga510.py b/chirp/drivers/ga510.py --- a/chirp/drivers/ga510.py +++ b/chirp/drivers/ga510.py @@ -17,7 +17,7 @@ has_future = True except ImportError: has_future = False - LOG.warning('python-future package is not available; ' + LOG.debug('python-future package is not available; ' '%s requires it' % __name__)
# GA510 also has DTCS code 645 diff --git a/chirp/drivers/ic2730.py b/chirp/drivers/ic2730.py --- a/chirp/drivers/ic2730.py +++ b/chirp/drivers/ic2730.py @@ -35,7 +35,7 @@ from builtins import bytes except ImportError: HAS_FUTURE = False - LOG.warning('python-future package is not ' + LOG.debug('python-future package is not ' 'available; %s requires it' % __name__)
MEM_FORMAT = """ diff --git a/chirp/drivers/tk8180.py b/chirp/drivers/tk8180.py --- a/chirp/drivers/tk8180.py +++ b/chirp/drivers/tk8180.py @@ -36,7 +36,7 @@ has_future = True except ImportError: has_future = False - LOG.warning('python-future package is not ' + LOG.debug('python-future package is not ' 'available; %s requires it' % __name__)
diff --git a/chirp/drivers/tmd710.py b/chirp/drivers/tmd710.py --- a/chirp/drivers/tmd710.py +++ b/chirp/drivers/tmd710.py @@ -36,7 +36,7 @@ from builtins import bytes except ImportError: HAS_FUTURE = False - LOG.warning('python-future package is not ' + LOG.debug('python-future package is not ' 'available; %s requires it' % __name__)
BAUD = 0
# HG changeset patch # User Kosta A. ve7kcy@gmail.com # Date 1632713960 25200 # Sun Sep 26 20:39:20 2021 -0700 # Node ID 5aa2294d78ea241c6573dcf1929475b072e73685 # Parent 3a40534ccc6e58d9818224eb8182bb62499fac80 Supress console spew from python-future warning in non-debug builds.
diff --git a/chirp/drivers/anytone778uv.py b/chirp/drivers/anytone778uv.py --- a/chirp/drivers/anytone778uv.py +++ b/chirp/drivers/anytone778uv.py @@ -60,7 +60,7 @@ has_future = True except ImportError: has_future = False
- LOG.warning('python-future package is not '
- LOG.debug('python-future package is not ' 'available; %s requires it' % __name__)
This will fail the style check because you didn't re-align the continued line. I've fixed it for you to apply, but please make sure your patches pass the style checks in the future.
--Dan
Thanks for fixing that.., do the test/style checks run on windows? Last time I checked they did not, is there another way to validate as i would be happy to run the test.
On Tue, Sep 28, 2021 at 5:59 PM Dan Smith via chirp_devel < chirp_devel@intrepid.danplanet.com> wrote:
# HG changeset patch # User Kosta A. ve7kcy@gmail.com # Date 1632713960 25200 # Sun Sep 26 20:39:20 2021 -0700 # Node ID 5aa2294d78ea241c6573dcf1929475b072e73685 # Parent 3a40534ccc6e58d9818224eb8182bb62499fac80 Supress console spew from python-future warning in non-debug builds.
diff --git a/chirp/drivers/anytone778uv.py
b/chirp/drivers/anytone778uv.py
--- a/chirp/drivers/anytone778uv.py +++ b/chirp/drivers/anytone778uv.py @@ -60,7 +60,7 @@ has_future = True except ImportError: has_future = False
- LOG.warning('python-future package is not '
- LOG.debug('python-future package is not ' 'available; %s requires it' % __name__)
This will fail the style check because you didn't re-align the continued line. I've fixed it for you to apply, but please make sure your patches pass the style checks in the future.
--Dan _______________________________________________ chirp_devel mailing list chirp_devel@intrepid.danplanet.com http://intrepid.danplanet.com/mailman/listinfo/chirp_devel Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
On Wed, Sep 29, 2021 at 1:27 AM Kosta Arvanitis via chirp_devel chirp_devel@intrepid.danplanet.com wrote:
Thanks for fixing that.., do the test/style checks run on windows? Last time I checked they did not, is there another way to validate as i would be happy to run the test.
They work for me. The driver needs to be in the cpep8.manifest list or it will not be style shcekcd.
D:\chirp.hg>python test\run_test.py
D:\chirp.hg>python tools\cpep8.py
I use a batch file that I created called RT.BAT to test the driver I'm working on and perform style checks on all drivers in the cpep8.manifest list
@echo off python tests\run_tests.py -d %1 python tools\cpep8.py
I use it like this.
D:\chirp.hg>rt {vendor}_{model}
This will test support for the Baofeng BF-888S radio and style check the h777.py driver (and all other drivers listed in cpep8.manifest)
D:\chirp.hg>rt Baofeng_BF-888
Don't forget to make sure that your driver is in the cpep8.manifest list (tools\cpep8.manifest). If it is not listed in the manifest, add it as part of your driver maintenance. Without it, the driver will be ignored by the style check and you will be given the false impression that it passed.
Jim KC9HI
participants (4)
-
Dan Smith
-
Jim Unroe
-
Kosta A.
-
Kosta Arvanitis