Skip to content

Refactor: Fix pylint code quality issues across adiftools package (9.22 → 9.95/10)#8

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/check-code-refactoring-areas
Draft

Refactor: Fix pylint code quality issues across adiftools package (9.22 → 9.95/10)#8
Copilot wants to merge 2 commits into
mainfrom
copilot/check-code-refactoring-areas

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 28, 2026

Several code quality issues identified by pylint across the package — incorrect exception syntax, missing file encodings, non-idiomatic type checks, and style issues in the graph module.

adiftools.py

  • Consolidated 4 fragmented try/except import blocks into one; fixed binary-or exception syntax: except (ModuleNotFoundError, ImportError)
  • Added encoding='utf-8' to all open() calls
  • Simplified is_loaded property to return len(self.df_adif) > 0
  • Initialized _temp_dfs in __init__; removed hasattr guards in read_adi_streaming

callsign.py / gridlocator.py

  • type(x) is not strnot isinstance(x, str)

adifgraph.py

  • except ModuleNotFoundError or ImportErrorexcept (ModuleNotFoundError, ImportError)
  • Renamed bar (disallowed name) → bars; unused fig_
  • '%d' % int(height)f'{int(height):d}'
  • Moved from pandas.api.types import PeriodDtype and import matplotlib as mpl re-import to module top-level
  • sum([row[band] for band in bands]) → generator expression
  • Hoisted text_rotation calculation out of loop in monthly_band_qso

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: JS2IIU-MH <146515386+JS2IIU-MH@users.noreply.github.com>
Copilot AI changed the title [WIP] Check for areas needing refactoring in workspace code Refactor: Fix pylint code quality issues across adiftools package (9.22 → 9.95/10) Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants