ignore-path-errors uses absolute path

Bug #1502391 reported by Frazer McLean
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
doc8
New
Undecided
Unassigned

Bug Description

Function `parse_ignore_path_errors` in doc8/main.py does this:

    path = os.path.abspath(path.strip())

So, in the `validate` function, `ignore_targeted` is a dictionary of absolute paths.

Then, the following line uses `f.filename`, which is a relative path.

    targeted_ignoreables = set(ignore_targeted.get(f.filename, set()))

Thus, the lookup doesn't find the correct path.

Changed in watcher:
status: New → Triaged
Andy Hsiang (yh418t)
Changed in watcher:
assignee: nobody → Andy Hsiang (yh418t)
Andy Hsiang (yh418t)
Changed in doc8:
assignee: nobody → Andy Hsiang (yh418t)
Andy Hsiang (yh418t)
Changed in doc8:
assignee: Andy Hsiang (yh418t) → nobody
Changed in watcher:
assignee: Andy Hsiang (yh418t) → nobody
Changed in watcher:
importance: Undecided → Low
milestone: none → newton-rc1
Revision history for this message
Brecht Machiels (brechtm) wrote :

This makes this option useless. Any plans on fixing this and releasing a new version? Thanks.

Changed in watcher:
milestone: newton-rc1 → newton-3
Changed in watcher:
assignee: nobody → David TARDIVEL (david-tardivel)
Changed in doc8:
assignee: nobody → David TARDIVEL (david-tardivel)
assignee: David TARDIVEL (david-tardivel) → nobody
no longer affects: watcher
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.