Add HiddenTagFilter #131

Merged
merged 3 commits into from Aug 30, 2016

Conversation

3 participants
@MinchinWeb
Contributor

MinchinWeb commented Jun 3, 2016

Use the h:1 tag to hide items from being listed

Includes tests (existing tests were adjusted to test for the expected behavior)

@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Jun 3, 2016

Current coverage is 97.31% (diff: 94.11%)

Merging #131 into master will increase coverage by 0.05%

@@             master       #131   diff @@
==========================================
  Files            50         50          
  Lines          2589       2605    +16   
  Methods           0          0          
  Messages          0          0          
  Branches        410        415     +5   
==========================================
+ Hits           2518       2535    +17   
+ Misses           43         41     -2   
- Partials         28         29     +1   

Powered by Codecov. Last update 86eb39d...6408ee5

codecov-io commented Jun 3, 2016

Current coverage is 97.31% (diff: 94.11%)

Merging #131 into master will increase coverage by 0.05%

@@             master       #131   diff @@
==========================================
  Files            50         50          
  Lines          2589       2605    +16   
  Methods           0          0          
  Messages          0          0          
  Branches        410        415     +5   
==========================================
+ Hits           2518       2535    +17   
+ Misses           43         41     -2   
- Partials         28         29     +1   

Powered by Codecov. Last update 86eb39d...6408ee5

topydo/lib/Filter.py
+ """
+ Constructor.
+
+ A filter which selects a number of Todo instances from a TodoList

This comment has been minimized.

@bram85

bram85 Jun 3, 2016

Owner

The documentation matches the preceding filter.

@bram85

bram85 Jun 3, 2016

Owner

The documentation matches the preceding filter.

topydo/lib/Filter.py
+
+ def match(self, p_todo):
+ """
+ Returns Ture when p_todo doesn't have a tag to mark it as hidden.

This comment has been minimized.

@bram85

bram85 Jun 3, 2016

Owner

Minor: True

@bram85

bram85 Jun 3, 2016

Owner

Minor: True

@MinchinWeb

This comment has been minimized.

Show comment
Hide comment
@MinchinWeb

MinchinWeb Jun 4, 2016

Contributor

@bram85 : Fixes added!

Contributor

MinchinWeb commented Jun 4, 2016

@bram85 : Fixes added!

MinchinWeb added some commits Jun 3, 2016

Add HiddenTagFilter
Use the `h:1` tag to hide items from being listed
@MinchinWeb

This comment has been minimized.

Show comment
Hide comment
@MinchinWeb

MinchinWeb Jul 25, 2016

Contributor

Rebased to v0.10 release

Contributor

MinchinWeb commented Jul 25, 2016

Rebased to v0.10 release

topydo/lib/Filter.py
+ A filter which hides items marked with the approriate tag.
+ """
+ super().__init__()
+ self.todos = p_todos

This comment has been minimized.

@bram85

bram85 Aug 24, 2016

Owner

self.todos is not used, so I'd remove it from the constructor.

@bram85

bram85 Aug 24, 2016

Owner

self.todos is not used, so I'd remove it from the constructor.

@bram85

This comment has been minimized.

Show comment
Hide comment
@bram85

bram85 Aug 24, 2016

Owner

Looks good as far as I can see, bar a minor remark on an unused variable.

Personally I use the h tag to hide an item just for one day, for instance I write h:2016-08-24 in a todo item and have a column defined in column mode with filter +Project -h:today. Could be a future extension.

Owner

bram85 commented Aug 24, 2016

Looks good as far as I can see, bar a minor remark on an unused variable.

Personally I use the h tag to hide an item just for one day, for instance I write h:2016-08-24 in a todo item and have a column defined in column mode with filter +Project -h:today. Could be a future extension.

@MinchinWeb

This comment has been minimized.

Show comment
Hide comment
@MinchinWeb

MinchinWeb Aug 29, 2016

Contributor

@bram85 : I've removed the unused variable. I think we're good to go then!

Contributor

MinchinWeb commented Aug 29, 2016

@bram85 : I've removed the unused variable. I think we're good to go then!

@bram85

This comment has been minimized.

Show comment
Hide comment
@bram85

bram85 Aug 30, 2016

Owner

Thanks :)

Owner

bram85 commented Aug 30, 2016

Thanks :)

@bram85 bram85 merged commit a7c495b into bram85:master Aug 30, 2016

2 checks passed

codecov/project 97.31% (+0.05%) compared to 86eb39d
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MinchinWeb MinchinWeb deleted the MinchinWeb:hidden-tag branch Oct 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment