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

psf / black / 1938
96%

Build:
DEFAULT BRANCH: master
Ran 01 Jun 2020 06:01PM UTC
Jobs 4
Files 8
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

pending completion
1938

push

travis-ci

web-flow
Convert (most of the) configuration values from pyproject.toml to strings (#1466)

* Convert config values to string

We need to convert all configuration values from the pyproject.toml
file because Click already does value processing and conversion and
it only expects the exact Python type or string. Click doesn't like
the integer 1 as a boolean for example. This also means other
unsupported types like datetime.time will be rejected by Click as
a unvalid value instead of throwing an exception.

We only skip converting objects that are an instance of
collections.abc.Iterable because it's almost impossible to get back
the original iterable of a stringified iterable.

* Move where the conversion happens

Instead of converting the values in the merged 'default_map', I should
convert the values that were read from the 'pyproject.toml' file.

* Change collections.abc.Iterable to (list, dict)

I also moved where the conversion happens... again. I am rather indecisive
if you haven't noticed. It should be better as it takes place in the
parse_pyproject_toml logic where configuration modification already takes
place.

Actually when this PR was first created I had the conversion happen in that
return statement, but the target_version check was complaining about it being
a string. So I moved the conversion after that check, but then Click didn't
like the stringifed list, which led me to check whether the value was an
instance of an Iterable before turning it into a string. And... I forgot that
type checking before conversion would allow it to work before the
target_version check anyway.

1 of 1 new or added line in 1 file covered. (100.0%)

4530 of 4722 relevant lines covered (95.93%)

2.87 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1938.1 (TEST_CMD="pre-commit run --all-files") 01 Jun 2020 06:02PM UTC 0
0.0
Travis Job 1938.1
2 1938.2 (TEST_CMD="coverage run -m unittest") 01 Jun 2020 06:01PM UTC 0
95.66
Travis Job 1938.2
3 1938.3 (TEST_CMD="coverage run -m unittest") 01 Jun 2020 06:02PM UTC 0
95.66
Travis Job 1938.3
4 1938.4 (TEST_CMD="coverage run -m unittest") 01 Jun 2020 06:02PM UTC 0
95.75
Travis Job 1938.4
Source Files on build 1938
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1938
  • d10f8573 on github
  • Prev Build on master (#976)
  • Next Build on master (#977)
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