coveralls: 
[![Coverage Status](https://coveralls.io/builds/21168378/badge)](https://coveralls.io/builds/21168378)

Coverage remained the same at 95.508% when pulling **cd180bd1cb6ab02b94c1b04a4cc343e11879c4d3 on yinyin:improve-continuation-valign-option-parsing** into **9546d407a4f898cd341e4e12e4b7cd50b6c5c2a2 on google:master**.

coveralls: 
[![Coverage Status](https://coveralls.io/builds/21168378/badge)](https://coveralls.io/builds/21168378)

Coverage remained the same at 95.508% when pulling **cd180bd1cb6ab02b94c1b04a4cc343e11879c4d3 on yinyin:improve-continuation-valign-option-parsing** into **9546d407a4f898cd341e4e12e4b7cd50b6c5c2a2 on google:master**.

gwelymernans: Could you add a couple of test cases please?
gwelymernans: Also, please update the change log.
diff --git a/CHANGELOG b/CHANGELOG
index 214f013..00f226f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -13,6 +13,8 @@
   the list that is greater than the maximum line length in the block.
 - Don't modify the vertical spacing of a line that has a comment "pylint:
   disable=line-too-long". The line is expected to be too long.
+- improved `CONTINUATION_ALIGN_STYLE` to accept quoted or underline-separated
+  option value for passing option with command line arguments.
 ### Fixed
 - When retrieving the opening bracket make sure that it's actually an opening
   bracket.
diff --git a/yapf/yapflib/style.py b/yapf/yapflib/style.py
index 8345304..f5a002a 100644
--- a/yapf/yapflib/style.py
+++ b/yapf/yapflib/style.py
@@ -437,7 +437,7 @@ def _ContinuationAlignStyleStringConverter(s):
   """Option value converter for a continuation align style string."""
   accepted_styles = ('SPACE', 'FIXED', 'VALIGN-RIGHT')
   if s:
-    r = s.upper()
+    r = s.strip('"\'').replace('_', '-').upper()
     if r not in accepted_styles:
       raise ValueError('unknown continuation align style: %r' % (s,))
   else:

_CreateConfigParserFromConfigString buggy for values with quotes - it captures quotes too
ver: 0.24 

steps repeat:

    yapf --style='{use_tabs: true, continuation_align_style: "valign-right"}' --style-help

gives:

    yapf: '"valign-right"' is not a valid setting for CONTINUATION_ALIGN_STYLE.
diff --git a/yapftests/style_test.py b/yapftests/style_test.py
index ff4643e..3d4e1b1 100644
--- a/yapftests/style_test.py
+++ b/yapftests/style_test.py
@@ -27,14 +27,25 @@ from yapftests import utils
 class UtilsTest(unittest.TestCase):
 
   def testContinuationAlignStyleStringConverter(self):
-    self.assertEqual(style._ContinuationAlignStyleStringConverter(''), 'SPACE')
-    self.assertEqual(
-        style._ContinuationAlignStyleStringConverter('space'), 'SPACE')
-    self.assertEqual(
-        style._ContinuationAlignStyleStringConverter('fixed'), 'FIXED')
-    self.assertEqual(
-        style._ContinuationAlignStyleStringConverter('valign-right'),
-        'VALIGN-RIGHT')
+    for cont_align_space in ('', 'space', '"space"', '\'space\''):
+      self.assertEqual(
+          style._ContinuationAlignStyleStringConverter(cont_align_space),
+          'SPACE')
+    for cont_align_fixed in ('fixed', '"fixed"', '\'fixed\''):
+      self.assertEqual(
+          style._ContinuationAlignStyleStringConverter(cont_align_fixed),
+          'FIXED')
+    for cont_align_valignright in (
+        'valign-right',
+        '"valign-right"',
+        '\'valign-right\'',
+        'valign_right',
+        '"valign_right"',
+        '\'valign_right\'',
+    ):
+      self.assertEqual(
+          style._ContinuationAlignStyleStringConverter(cont_align_valignright),
+          'VALIGN-RIGHT')
     with self.assertRaises(ValueError) as ctx:
       style._ContinuationAlignStyleStringConverter('blahblah')
     self.assertIn("unknown continuation align style: 'blahblah'",

pip install -e .
parse_log_pytest
pytest
pytest
3.6.4
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
certifi==2021.5.30
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
-e git+https://github.com/google/yapf.git@9546d407a4f898cd341e4e12e4b7cd50b6c5c2a2#egg=yapf
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: yapf
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib-metadata=4.8.1=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - libedit=3.1.20230828=h5eee18b_0
  - libffi=3.2.1=hf484d3e_1007
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.0.2u=h7b6447c_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.4=hc3d631a_3
  - readline=7.0=h7b6447c_5
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.33.0=h62c20be_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
prefix: /opt/conda/envs/yapf

yapftests/style_test.py::UtilsTest::testContinuationAlignStyleStringConverter
yapftests/style_test.py::UtilsTest::testBoolConverter yapftests/style_test.py::UtilsTest::testIntListConverter yapftests/style_test.py::UtilsTest::testIntOrIntListConverter yapftests/style_test.py::UtilsTest::testStringListConverter yapftests/style_test.py::PredefinedStylesByNameTest::testChromiumByName yapftests/style_test.py::PredefinedStylesByNameTest::testDefault yapftests/style_test.py::PredefinedStylesByNameTest::testFacebookByName yapftests/style_test.py::PredefinedStylesByNameTest::testGoogleByName yapftests/style_test.py::PredefinedStylesByNameTest::testPEP8ByName yapftests/style_test.py::StyleFromFileTest::testBoolOptionValue yapftests/style_test.py::StyleFromFileTest::testDefaultBasedOnChromiumStyle yapftests/style_test.py::StyleFromFileTest::testDefaultBasedOnFacebookStyle yapftests/style_test.py::StyleFromFileTest::testDefaultBasedOnGoogleStyle yapftests/style_test.py::StyleFromFileTest::testDefaultBasedOnPEP8Style yapftests/style_test.py::StyleFromFileTest::testDefaultBasedOnStyle yapftests/style_test.py::StyleFromFileTest::testErrorNoStyleFile yapftests/style_test.py::StyleFromFileTest::testErrorNoStyleSection yapftests/style_test.py::StyleFromFileTest::testErrorUnknownStyleOption yapftests/style_test.py::StyleFromFileTest::testStringListOptionValue yapftests/style_test.py::StyleFromDict::testDefaultBasedOnStyle yapftests/style_test.py::StyleFromDict::testDefaultBasedOnStyleBadDict yapftests/style_test.py::StyleFromCommandLine::testDefaultBasedOnDetaultTypeString yapftests/style_test.py::StyleFromCommandLine::testDefaultBasedOnExplicitlyUnicodeTypeString yapftests/style_test.py::StyleFromCommandLine::testDefaultBasedOnStyle yapftests/style_test.py::StyleFromCommandLine::testDefaultBasedOnStyleBadString yapftests/style_test.py::StyleFromCommandLine::testDefaultBasedOnStyleNotStrict yapftests/style_test.py::StyleHelp::testHelpKeys
yapf/yapflib/style.py CHANGELOG
yapf/yapflib/style.py CHANGELOG