• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 4165 / 3
0%
main: 93%

Build:
Build:
LAST BUILD BRANCH: free-threaded-python
DEFAULT BRANCH: main
Ran 21 Mar 2015 04:28AM UTC
Files 319
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Mar 2015 04:21AM UTC coverage: 69.293% (+0.02%) from 69.272%
CI_FLAGS="-fkmsrcnet 'Python unit tests for pants and pants-plugins'"

push

travis-ci

ity
Removing dead code.

Note first, in passing, that `isinstance(type(action), type)` is a tautology. But, that aside, what this code seems to be trying to do is check whether the `action` is either a class representing a subclass of Task  or a function of either zero or one arguments. In the latter case it wants to make a new subclass of Task that invokes the function when executed. However, the function wrapping code can't possibly work unless I'm deeply missing something: In the `__init__` method of `FuncTask` the args parameter containing the positional arguments to `__init__` has to be either empty or contain one argument. However TaskBase in task.py defines an `__init__` that takes two positional arguments.

So any attempt to construct an instance of `FuncTask` would fail: if passed zero or one arguments, the call to `super(FuncTask, self).__init__(...)` will fail because the super constructer needs two positional arguments and if called with more than one arguments it will raise an `AssertionError` itself.

It's possible that the code was meant to refer to the args in the enclosing scope but, unless I'm very confused about Python, it does not so this code must never be used so might as well be deleted.

Testing Done:
Travis-CI.

Bugs closed: 1295

Reviewed at https://rbcommons.com/s/twitter/r/1960/

12727 of 18367 relevant lines covered (69.29%)

0.69 hits per line

Source Files on job 4165.3 (CI_FLAGS="-fkmsrcnet 'Python unit tests for pants and pants-plugins'")
  • Tree
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 4165
  • Travis Job 4165.3
  • 1ccd3ee3 on github
  • Prev Job for CI_FLAGS="-fkmsrcnet 'Python unit tests for pants and pants-plugins'" on master (#4164.3)
  • Next Job for CI_FLAGS="-fkmsrcnet 'Python unit tests for pants and pants-plugins'" on master (#4167.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc