Merge pull request #492 from peterludemann/fix-style-doc
fix --help for where style file is found
diff --git a/README.rst b/README.rst
index 7aeecdb..4d4237c 100644
--- a/README.rst
+++ b/README.rst
@@ -113,9 +113,10 @@
--style STYLE specify formatting style: either a style name (for
example "pep8" or "google"), or the name of a file
with style settings. The default is pep8 unless a
- .style.yapf or setup.cfg file located in one of the
- parent directories of the source file (or current
- directory for stdin)
+ .style.yapf or setup.cfg file located in the same
+ directory as the source or one of its parent
+ directories (for stdin, the current directory is
+ used).
--style-help show style settings and exit; this output can be saved
to .style.yapf to make your settings permanent
--no-local-style don't search for local style definition
diff --git a/yapf/__init__.py b/yapf/__init__.py
index 7a0f176..cc820e4 100644
--- a/yapf/__init__.py
+++ b/yapf/__init__.py
@@ -99,9 +99,10 @@
action='store',
help=('specify formatting style: either a style name (for example "pep8" '
'or "google"), or the name of a file with style settings. The '
- 'default is pep8 unless a %s or %s file located in one of the '
- 'parent directories of the source file (or current directory for '
- 'stdin)' % (style.LOCAL_STYLE, style.SETUP_CONFIG)))
+ 'default is pep8 unless a %s or %s file located in the same '
+ 'directory as the source or one of its parent directories '
+ '(for stdin, the current directory is used).' %
+ (style.LOCAL_STYLE, style.SETUP_CONFIG)))
parser.add_argument(
'--style-help',
action='store_true',