Opened 2 years ago
Closed 2 years ago
#14203 closed task (fixed)
Static analysis updates
Reported by: | figaro | Owned by: | Ralph Ewig |
---|---|---|---|
Priority: | low | Component: | TracChecklistMacro |
Severity: | normal | Keywords: | patch |
Cc: | Trac Release: |
Description
A few static analysis updates using codespell and autopep is attached.
Please also note that your files plugin.py
and checklist.js
are empty and should probably be deleted.
Attachments (1)
Change History (7)
Changed 2 years ago by
Attachment: | tracchecklistmacro.diff added |
---|
comment:1 Changed 2 years ago by
Status: | new → accepted |
---|
Thanks for the feedback! I've been tied up with work but should have time to catch up on tickets in another 2 weeks.
comment:2 Changed 2 years ago by
I've got pylint working now and most issues in macros.py are fixed in v0.1.7. However, there is one I'm not sure about: In my implementation of IEnvironmentSetupParticipant I initialize DatabaseManager using:
dbm = DatabaseManager(self.env)
Based on the example in the doc page this does seem correct; however pylint picks this up as an error:
[{ "resource": "/srv/trac/dev/TracChecklist/checklist/macros.py", "owner": "python", "code": "too-many-function-args", "severity": 8, "message": "Too many positional arguments for constructor call", "source": "pylint", "startLineNumber": 330, "startColumn": 15, "endLineNumber": 330, "endColumn": 15 }]
I also looked at the v1.4 API doc, but wasn't smart enough to understand whether just passing the implied "self" as the only argument is sufficient - is the example documentation wrong?
comment:3 Changed 2 years ago by
Your use of DatabaseManager
is correct. I think pylint is just confused by how Trac implements its classes.
Minor typo here: [18523#file0].
comment:4 Changed 2 years ago by
ok, just uploaded v0.1.8 which should have everything linted/formatted/spellchecked now.
comment:5 Changed 2 years ago by
Ok, thank you. Can you also close this ticket (dont have permission myself)?
comment:6 Changed 2 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Diff -u of plugin updates