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

hugovk / black / 127
95%

Build:
DEFAULT BRANCH: master
Ran 13 Aug 2020 07:43AM UTC
Jobs 5
Files 8
Run time 41s
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

pending completion
127

push

travis-ci

web-flow
Make --exclude only apply to recursively found files (#1591)

Ever since --force-exclude was added, --exclude started to touch files
that were given to Black through the CLI too. This is not documented
behaviour and neither expected as --exclude and --force-exclude now
behave the same!

Before this commit, get_sources() when encountering a file that was passed
explicitly through the CLI would pass a single Path object list to
gen_python_files(). This causes bad behaviour since that function
doesn't treat the exclude and force_exclude regexes differently. Which
is fine for recursively found files, but *not* for files given through
the CLI.

Now when get_sources() iterates through srcs and encounters
a file, it checks if the force_exclude regex matches, if not, then the
file will be added to the computed sources set.

A new function had to be created since before you can do regex matching,
the path must be normalized. The full process of normalizing the path is
somewhat long as there is special error handling. I didn't want to
duplicate this logic in get_sources() and gen_python_files() so that's
why there is a new helper function.

49 of 49 new or added lines in 2 files covered. (100.0%)

4595 of 4791 relevant lines covered (95.91%)

3.83 hits per line

Jobs
ID Job ID Ran Files Coverage
1 127.1 (TEST_CMD="pre-commit run --all-files --show-diff-on-failure") 13 Aug 2020 07:43AM UTC 0
0.0
Travis Job 127.1
2 127.2 (TEST_CMD="coverage run -m unittest") 13 Aug 2020 07:43AM UTC 0
95.64
Travis Job 127.2
3 127.3 (TEST_CMD="coverage run -m unittest") 13 Aug 2020 07:43AM UTC 0
95.64
Travis Job 127.3
4 127.4 (TEST_CMD="coverage run -m unittest") 13 Aug 2020 07:43AM UTC 0
95.73
Travis Job 127.4
5 127.5 (TEST_CMD="coverage run -m unittest") 13 Aug 2020 07:43AM UTC 0
95.69
Travis Job 127.5
Source Files on build 127
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #127
  • 97c11f22 on github
  • Prev Build on master (#126)
  • Next Build on master (#128)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc