Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply some fixes for flake8 #672

Merged
merged 13 commits into from
Jun 27, 2023
Merged

Apply some fixes for flake8 #672

merged 13 commits into from
Jun 27, 2023

Commits on Jun 27, 2023

  1. Ignore false positive "F821 undefined name '_'"

    The function _() is installed in Python’s builtins namespace by
    chirp/wxui/__init__.py
    dforsi authored and kk7ds committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    b1aa941 View commit details
    Browse the repository at this point in the history
  2. Fix undefined names

    Fixes:
    ./chirp/drivers/lt725uv.py:269:9: F821 undefined name 'Log'
    ./chirp/drivers/vgc.py:354:9: F821 undefined name 'Log'
    ./chirp/drivers/ap510.py:407:19: F821 undefined name 'file'
    ./chirp/drivers/btech.py:811:62: F821 undefined name 'value'
    ./chirp/drivers/ic2730.py:1309:29: F821 undefined name 'sstx'
    ./chirp/drivers/thd72.py:839:9: F821 undefined name 'file'
    ./chirp/drivers/thd72.py:841:19: F821 undefined name 'file'
    ./chirp/drivers/tk760.py:229:19: F821 undefined name 'hexprint'
    ./chirp/drivers/retevis_rt98.py:591:17: F821 undefined name 'radio'
    dforsi authored and kk7ds committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    34131e8 View commit details
    Browse the repository at this point in the history
  3. Fix W605 invalid escape sequence

    Fixes:
    ./chirp/drivers/kguv920pa.py:39:13: W605 invalid escape sequence '\]'
    ./chirp/drivers/retevis_rt87.py:199:47: W605 invalid escape sequence '\]'
    ./chirp/drivers/vx3.py:941:34: W605 invalid escape sequence '\d'
    ./chirp/drivers/ft90.py:674:34: W605 invalid escape sequence '\d'
    ./chirp/drivers/vx2.py:715:34: W605 invalid escape sequence '\d'
    ./chirp/drivers/ft1d.py:586:33: W605 invalid escape sequence '\d'
    ./chirp/drivers/ft1d.py:586:39: W605 invalid escape sequence '\s'
    ./chirp/drivers/ft1d.py:586:52: W605 invalid escape sequence '\d'
    ./chirp/drivers/vgc.py:1429:40: W605 invalid escape sequence '\d'
    ./chirp/drivers/vx8.py:525:33: W605 invalid escape sequence '\d'
    ./chirp/drivers/vx8.py:525:39: W605 invalid escape sequence '\s'
    ./chirp/drivers/vx8.py:525:52: W605 invalid escape sequence '\d'
    ./chirp/drivers/tk760g.py:88:71: W605 invalid escape sequence '\F'
    ./chirp/drivers/tk760g.py:277:59: W605 invalid escape sequence '\-'
    ./chirp/drivers/ic9x.py:51:30: W605 invalid escape sequence '\]'
    ./chirp/drivers/vx6.py:874:44: W605 invalid escape sequence '\d'
    ./chirp/drivers/vx6.py:887:37: W605 invalid escape sequence '\d'
    ./chirp/drivers/ap510.py:330:11: W605 invalid escape sequence '\#'
    ./chirp/drivers/ft7800.py:746:34: W605 invalid escape sequence '\d'
    ./chirp/drivers/retevis_rt26.py:885:40: W605 invalid escape sequence '\d'
    dforsi authored and kk7ds committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    0eda256 View commit details
    Browse the repository at this point in the history
  4. Remove unused dictionary SETTING_LISTS

    dforsi authored and kk7ds committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    fa205c1 View commit details
    Browse the repository at this point in the history
  5. Remove unused imports

    Removed with:
    autoflake --in-place --recursive --ignore-pass-after-docstring --remove-all-unused-imports .
    and non committing the removal of "pass" statements.
    dforsi authored and kk7ds committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    2193ab3 View commit details
    Browse the repository at this point in the history
  6. Remove unused variable in except clauses

    Fixes:
    F841 local variable 'e' is assigned to but never used
    dforsi authored and kk7ds committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    9e9d287 View commit details
    Browse the repository at this point in the history
  7. Remove duplicate imports

    Fixes:
    ./chirp/drivers/retevis_rt98.py:25:1: F811 redefinition of unused 'RadioSettingValueString' from line 25
    ./chirp/drivers/th9000.py:25:1: F811 redefinition of unused 'RadioSettingValueString' from line 25
    ./chirp/drivers/icf.py:25:1: F811 redefinition of unused 'struct' from line 21
    ./chirp/drivers/icf.py:31:1: F811 redefinition of unused 'util' from line 27
    dforsi authored and kk7ds committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    1a9f12b View commit details
    Browse the repository at this point in the history
  8. Remove duplicate methods

    Fixes:
    ./chirp/drivers/icx90.py:670:5: F811 redefinition of unused 'get_raw_memory' from line 605
    ./chirp/drivers/ft1d.py:2528:5: F811 redefinition of unused 'apply_WEhemi' from line 2521
    dforsi authored and kk7ds committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    27e870d View commit details
    Browse the repository at this point in the history
  9. Fix two instances of "E722 do not use bare 'except'"

    For consistency with the set_settings() method in other drivers
    dforsi authored and kk7ds committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    d03a5d4 View commit details
    Browse the repository at this point in the history
  10. Remove clean files from tools/cpep8.manifest

    dforsi authored and kk7ds committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    d977a35 View commit details
    Browse the repository at this point in the history
  11. Fix typo

    Fixes:
    chirp/chirp_common.py:398:15: E1101: Instance of 'Memory' has no 'freqx' member; maybe 'freq'? (no-member)
    dforsi authored and kk7ds committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    1bbed4f View commit details
    Browse the repository at this point in the history
  12. Remove unused variable and unneeded seek()

    Fixes:
    chirp/drivers/generic_csv.py:199:12: W0612: Unused variable 'header' (unused-variable)
    dforsi authored and kk7ds committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    8017a25 View commit details
    Browse the repository at this point in the history
  13. Remove unused bandplan_na import from wp970i

    This was probably lost in a rebase.
    kk7ds committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    25f96cd View commit details
    Browse the repository at this point in the history