Project

Profile

Help

Support #5871

open

Correct pylint warnings

Added by Norm Tovey-Walsh almost 2 years ago. Updated 5 months ago.

Status:
AwaitingInfo
Priority:
Normal
Category:
Python API
Start date:
2023-02-05
Due date:
% Done:

0%

Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
12.3
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

Description

If you run pylint against a script that uses our wheels, you'll get warnings like this:

module.py:7:0: E0611: No name 'PySaxonProcessor' in module 'saxonche' (no-name-in-module)

These warnings also appear in IDEs that do linting and I presume the lack of declarations "in the module" means that IDEs have no way to offer completions.

I assume this could be fixed by putting something in, probably, a __init__.py file, but I don't know what.

Actions #1

Updated by O'Neil Delpratt about 1 year ago

  • Category set to Python API
  • Assignee set to O'Neil Delpratt
  • Found in version set to 12.3

sorry I have dropped the ball on this issue. I will investigate this further.

Actions #2

Updated by O'Neil Delpratt 6 months ago

  • Assignee changed from O'Neil Delpratt to Matt Patterson
Actions #3

Updated by Matt Patterson 5 months ago

  • Tracker changed from Bug to Support
  • Status changed from New to Resolved

After some research, I found this issue from pylint: https://github.com/pylint-dev/pylint/issues/1524

I tried one of the suggestions, which gets pylint to load the module and get info from the AST instead of ignoring it because there's no python source to parse.

$ pylint --extension-pkg-whitelist=saxonche  test_with_pylint.py
************ Module test_with_pylint
test_with_pylint.py:1:0: C0114: Missing module docstring (missing-module-docstring)

------------------------------------------------------------------
Your code has been rated at 6.67/10 (previous run: 0.00/10, +6.67)

So, I think this may be a red herring.

There's another project called cython-lint for linting Cython projects, and that one is much less happy about our .pyx file, but I'm not sure how canonical that project is. I'm going to mark this issue resolved, and we can discuss linting our Cython code separately.

Actions #4

Updated by O'Neil Delpratt 5 months ago

  • Status changed from Resolved to AwaitingInfo

Please register to edit this issue

Also available in: Atom PDF